home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / uniterm.zoo / ug.asc / uniterm2.asc < prev   
Text File  |  1990-04-06  |  116KB  |  3,031 lines

  1.  
  2.  
  3.  
  4.  
  5.                              UniTerm Users Guide
  6.  
  7.  
  8.  
  9.                                  Simon Poole
  10.  
  11.  
  12.                               February 3, 1988
  13.  
  14. Users Guide for UniTerm 2.0c (002)
  15. Version 1.08 ASCII
  16. Copyright 1987/1988 by Simon Poole
  17.  
  18. All rights reserved. No part of this publication may be reproduced without the 
  19. permission  of  the  publisher.  I  make no  warranty  with  respect  to  this 
  20. publication, or the program it describes, and disclaim any implied or explicit 
  21. suggestions of usefulness for any particular purpose.
  22.  
  23. Use  this program only if you are willing to assume all risks,   and  damages,  
  24. if any, arising as a result, even if caused by negligence or other fault.
  25.  
  26.  
  27.         GEM  is a trademark of Digital Research Co.  DEC,VT are trademarks  of  
  28.         Digital  Equipment  Co.  Tektronix  is  a  trademark  of Tektronix Co.
  29.         
  30.         Atari is a trademark of Atari Co.
  31.  
  32.         The  Kermit file transfer protocol was developed by Frank da Cruz  and 
  33.         Bill Catchings at Columbia University.  Many thanks!
  34.  
  35. This document was semi-automatically produced from the original DVI  file,  it 
  36. does  not do justice to the quality of the original.  In particular  footnotes 
  37. are missing and some tables are not complete.
  38.  
  39.  
  40.  
  41. Contents
  42.  
  43.  
  44.  
  45. 1    Introduction                                                            1
  46.  
  47.  
  48. 2    Starting Using UniTerm                                                  2
  49.      2.1    Requirements  .................................................  2
  50.      2.2    Getting Started ...............................................  2
  51.             2.2.1     Desk Menu  ..........................................  2
  52.             2.2.2     File Menu ...........................................  3
  53.             2.2.3     Transfer Menu  ......................................  3
  54.             2.2.4     Settings Menu   .....................................  4
  55.             2.2.5     Other Menu ..........................................  4
  56.      2.3    Exiting UniTerm  ..............................................  5
  57.      2.4    Vector Graphics Mode  .........................................  5
  58.      2.5    Zoom Mode  ....................................................  5
  59.      2.6    GIN Mode ......................................................  6
  60.      2.7    Tektronix 4014 Alpha Mode .....................................  6
  61.      2.8    Using the Special Keys ........................................  6
  62.      2.9    The Clipboard  ................................................  8
  63.      2.10   Mouse Cursor Control  .........................................  8
  64.      2.11   Popup Menu   ..................................................  9
  65.      2.12   Viewing the History Buffer   ..................................  9
  66.      2.13   Dialer   ......................................................  9
  67.      2.14   Meta Mode   ...................................................  9
  68.  
  69. 3    More About UniTerm                                                     11
  70.      3.1    RS232 Port Parameters   ....................................... 11
  71.      3.2    Terminal Parameters ........................................... 12
  72.             3.2.1     Terminal 1   ........................................ 12
  73.             3.2.2     Terminal 2   ........................................ 13
  74.      3.3    Graphics Terminal Parameters  ................................. 13
  75.      3.4    Tabs  ......................................................... 14
  76.      3.5    Changing Buffer Sizes   ....................................... 14
  77.      3.6    Setup Files   ................................................. 14
  78.  
  79.      3.7    File Capture/Playback ......................................... 15
  80.      3.8    Editing Function Keys  ........................................ 15
  81.      3.9    The Statusline  ............................................... 15
  82.      3.10   The Single-line Editor  ....................................... 15
  83.      3.11   Single Character Commands...................................... 16
  84.  
  85. 4    File Transfer                                                          17
  86.      4.1    General  ...................................................... 17
  87.      4.2    ASCII File Transfer  .......................................... 17
  88.             4.2.1     Using ASCII File Transfer ........................... 17
  89.             4.2.2     Setting the ASCII File Transfer Parameters  ......... 17
  90.      4.3    XModem/YModem ................................................. 18
  91.             4.3.1     Using XModem ........................................ 18
  92.             4.3.2     Using YModem Batch .................................. 19
  93.             4.3.3     Setting the XModem Parameters ....................... 19
  94.      4.4    Kermit ........................................................ 19
  95.             4.4.1     UniTerm Kermit Capabilities ......................... 19
  96.             4.4.2     Simple File Transfer  ............................... 20
  97.             4.4.3     Binary File Transfer  ............................... 20
  98.             4.4.4     Server Commands   ................................... 21
  99.             4.4.5     Setting the Kermit Parameters  ...................... 21
  100.  
  101. 5    Customizing UniTerm                                                    23
  102.      5.1    Popup Menu   .................................................. 23
  103.      5.2    Key Bindings  ................................................. 23
  104.  
  105. 6    Implementation Notes                                                   24
  106.      6.1    General  ...................................................... 24
  107.      6.2    VT102/VT100 Mode .............................................. 25
  108.             6.2.1     Smooth Scrolling .................................... 25
  109.             6.2.2     132 Column Mode  .................................... 25
  110.             6.2.3     Double Height/Width Characters    ................... 25
  111.             6.2.4     Extended character set in 8 bit mode    ............. 25
  112.      6.3    VT200 Mode  ................................................... 25
  113.             6.3.1     VT200 function keys  ................................ 25
  114.             6.3.2     C0/C1 Modes ......................................... 26
  115.             6.3.3     International character set ......................... 26
  116.             6.3.4     Downloadable character set  ......................... 26
  117.             6.3.5     Downloadable function keys  ......................... 26
  118.             6.3.6     Regis   ............................................. 26
  119.      6.4    Tektronix  Mode................................................ 26
  120.      6.5    General  ...................................................... 26
  121.             6.5.1     Alpha Mode .......................................... 27
  122.             6.5.2     Vector Mode   ....................................... 27
  123.  
  124.             6.5.3     Zoom Mode ........................................... 27
  125.      6.6    Problems   .................................................... 27
  126.  
  127. A    Control Codes and Escape Sequences                                     28
  128.      A.1    ANSI/VT2XX/VT102/VT100 Mode  .................................. 28
  129.             A.1.1     Set Mode  ........................................... 28
  130.             A.1.2     Reset Mode  ......................................... 29
  131.             A.1.3     Select Character Sets................................ 29
  132.             A.1.4     Shift into Character Sets   ......................... 30
  133.             A.1.5     Character Attributes   .............................. 30
  134.             A.1.6     Scrolling Region   .................................. 30
  135.             A.1.7     Cursor Movement Commands   .......................... 30
  136.             A.1.8     Tab Stops    ........................................ 30
  137.             A.1.9     Line Attributes    .................................. 31
  138.             A.1.10    Erasing  ............................................ 31
  139.             A.1.11    Requests/Reports   .................................. 31
  140.             A.1.12    Reset   ............................................. 32
  141.             A.1.13    Tests ............................................... 32
  142.             A.1.14    Keyboard LED's  ..................................... 32
  143.             A.1.15    VT52 Mode ........................................... 32
  144.             A.1.16    Editing Functions   ................................. 33
  145.             A.1.17    Print Commands ...................................... 33
  146.             A.1.18    Other Control Characters  ........................... 33
  147.             A.1.19    Nonstandard Functions  .............................. 34
  148.      A.2    VT2XX Functions  .............................................. 34
  149.             A.2.1     Character Sets  ..................................... 34
  150.             A.2.2     Terminal Modes   .................................... 35
  151.             A.2.3     Selective Erasing and Attributes .................... 35
  152.             A.2.4     Reports  ............................................ 36
  153.             A.2.5     Misc  ...............  .............................. 36
  154.             A.2.6     Downloadable Function Keys   ........................ 36
  155.             A.2.7     Downloadable Character Sets  ........................ 36
  156.             A.2.8     Control Codes   ..................................... 36
  157.      A.3    VT3XX Functions  .............................................. 37
  158.             A.3.1     Set Mode  ........................................... 37
  159.             A.3.2     Reset Mode  ......................................... 37
  160.             A.3.3     National Replacement Character Sets  ................ 37
  161.      A.4    4014 Mode  .................................................... 38
  162.             A.4.1     Alpha Mode .......................................... 38
  163.             A.4.2     Other Functions and  ................................ 39
  164.             A.4.3     Vector Mode  ........................................ 39
  165.             A.4.4     Point Plot/Special   ................................ 40
  166.             A.4.5     Incremental Point Plot............................... 40
  167.      A.5    4105 Commands   ............................................... 40
  168.  
  169. B    ASCII Control Codes                                                    44
  170.      B.1    7-bit Control Codes   ......................................... 45
  171.      B.2    8-bit Control Codes   ......................................... 46
  172.  
  173. C    Simple Macro Processor                                                 47
  174.      C.1    Arguments   ................................................... 47
  175.      C.2    Functions  .................................................... 48
  176.      C.3    Prefix Operators  ............................................. 51
  177.      C.4    String Constants  ............................................. 52
  178.      C.5    Predefined String Variables  .................................. 52
  179.      C.6    Additional Features in Macro File Mode  ....................... 52
  180.             C.6.1  Labels  ................................................ 52
  181.             C.6.2  Comments  .............................................. 52
  182.             C.6.3  Additional Statements  ................................. 53  
  183.      C.7    Example  ...................................................... 53
  184.      C.8    UniTerm Internal Function Numbers.............................. 55
  185.  
  186. D    The KeyEdit Program                                                    58
  187.      D.1    Editing a UniTerm Setup File .................................. 58
  188.      D.2    Updating your Setup File  ..................................... 58
  189.  
  190. E    Key assignments and generated codes                                    60
  191.  
  192.  
  193. Chapter   1
  194.  
  195.  
  196.  
  197. Introduction
  198.  
  199.  
  200.  
  201. UniTerm  is  a program that emulates most of the functions of  DEC's  (Digital 
  202. Equipment Corporation) VT102 and VT220 text terminals and of Tektronix's  4014 
  203. graphics  terminal.   Additionally  UniTerm provides the  XModem,  YModem  and 
  204. Kermit file transfer protocols.
  205.  
  206. The  program UniTerm is copyrighted,  it can be copied,  distributed and  used 
  207. free  of  cost,   but may not be sold for more than  the  actual  distribution 
  208. costs.  Please  contact me,  if you find bugs or have suggestions for  revised 
  209. versions of UniTerm, but read appendix A and the implementation notes first.
  210.  
  211. Some compromises have been made in the implementation of the VT100 132  column  
  212. mode  and   double   width   characters  will not work  on  a  color  monitor. 
  213. Enhancements which are planned for future releases:
  214.  
  215.  
  216.      * Tektronix 4105 commands (already started!)
  217.  
  218.      * make UniTerm work with the blitter-chip
  219.  
  220.      * enhanced color version (colors for highlighted etc.)
  221.  
  222.  
  223. Chapter   2
  224.  
  225.  
  226.  
  227. Starting   Using   UniTerm
  228.  
  229.  
  230.  
  231. 2.1         Requirements
  232.  
  233.  
  234. To use UniTerm you need:
  235.  
  236.      * an ATARI ST computer
  237.  
  238.      * a monochrome or color monitor
  239.  
  240.      * an RS232 standard cable
  241.  
  242.      * a computer/modem to connect to
  243.  
  244.      * a floppy disk containing UNITERM.PRG and UNITERM.RSC
  245.  
  246.  
  247.  
  248. 2.2         Getting Started
  249.  
  250.  
  251. After   connecting   your  ST to  your  host   computer,   double  click   the 
  252. UniTerm  icon.  If you are using UniTerm for the first time an alert box  will 
  253. appear,  press   <Return> and ignore the error message (UniTerm  didn't   find  
  254. the  file UNITERM.SET,  which we will create later on),  the screen will clear 
  255. to  white(on  a   monochrome  monitor) with a statusline  on  line  25.  Press   
  256. <Help>    and the UniTerm help screen and a menu bar with  following  contents 
  257. will appear:
  258.  
  259. ______________________________________________________________________________
  260. |__Desk________File________Transfer_________Settings_______Other_____________|
  261.  
  262.  
  263. 2.2.1        Desk Menu
  264. ______________________________________________________________________________
  265. |Desk__________File_________Transfer_______Settings________Other_____________|
  266. |About_Uniterm..._____|
  267.  
  268. 2.2.   GETTING STARTED                                                       3
  269.  
  270.  
  271. [Desk] is the well known menu where you can start desk accessories and with
  272. the [About UniTerm...  ] entry you can find out which version of UniTerm you
  273. are using.
  274.  
  275.  
  276.  
  277. 2.2.2        File  Menu
  278. ______________________________________________________________________________
  279. |Desk_______File________Transfer_______Settings___________Other______________|
  280.        |Load Setup    |
  281.        |Save_Setup____|
  282.        |Load Numbers  |
  283.        |Save_Numbers__|
  284.        |Show Space    |
  285.        |Set Path      |
  286.        |Delete_File   |
  287.        |Run_Program   |
  288.        |Quit__________|
  289.  
  290.  
  291. [File] allows you to select from:
  292.     [Load Setup]            load a previously saved setup from disk.
  293.  
  294.     [Save Setup]            save the current settings of UniTerm to disk.
  295.  
  296.     [Load Numbers]          load a setup file for the dialer
  297.  
  298.     [Save Numbers]          save a setup file for the dialer
  299.  
  300.     [Delete File]           delete a file.
  301.  
  302.     [Set Path]              change the current GEMDOS drive and path.
  303.  
  304.     [Show Space]            show total available and free space on the current 
  305.                             drive.
  306.  
  307.     [Run Program]           execute a program without leaving UniTerm.
  308.  
  309.     [Quit Menu]             leave this screen and return to terminal mode.
  310.  
  311.  
  312.  
  313. 2.2.3        Transfer Menu
  314. ______________________________________________________________________________
  315. |Desk__________File________Transfer_____Settings____________Other____________|
  316.                           |ASCII    |
  317.                           |XModem   |
  318.                           |YModem   |
  319.                           |Kermit___|
  320.  
  321.  
  322. [Transfer] selects the file transfer protocol you want to use:  A change  here  
  323. is  reflected  in  a  different  dialog box  appearing  when  you  select  the 
  324. [File Transfer] item and in the protocol used when you type <Alt><T>.
  325.  
  326. 4                                          CHAPTER 2.   STARTING USING UNITERM
  327.  
  328.  
  329.  
  330. 2.2.4        Settings Menu
  331. ______________________________________________________________________________
  332. |Desk___________File_______Transfer_____Settings___________Other_____________|
  333.                                      |RS232         |
  334.                                      |Terminal 1    |
  335.                                      |Terminal 2    |
  336.                                      |File Transfer |
  337.                                      |Graphics      |
  338.                                      |Tabs          |
  339.                                      |Buffers_______|
  340.  
  341. [Settings] allows you to select from:
  342.    [RS232]               sets the parameters of the serial port.
  343.  
  344.    [Terminal 1]          sets   the  value  of  some  terminal   (text   mode)  
  345.                          parameters.
  346.  
  347.    [Terminal 2]          sets the rest of the terminal specific parameters
  348.  
  349.    [Graphics]            sets   the   values  for   the   graphics    terminal  
  350.                          module of UniTerm.
  351.  
  352.    [File Transfer]       allows   you   to   set  the   parameters   for   the  
  353.                          current file transfer mode.
  354.    [Buffers]             set the sizes of the buffers UniTerm uses.
  355.  
  356.    [Tabs]                set the tab positions (do not change without need,  a 
  357.                          lot of software depends on the "factory" settings)
  358.  
  359.  
  360.  
  361. 2.2.5        Other Menu
  362. ______________________________________________________________________________
  363. |Desk________File_______Transfer_______Settings_______Other__________________|
  364.                                                      |Dialer             |
  365.                                                      |Edit_Function_Keys_|
  366.  
  367. [Other] has two items:
  368.  
  369.    [Edit Function Keys]  allows  you to assign a string and/or macro  commands 
  370.                          to a function key.
  371.    [Dialer]              setup  the dialling sequences and  telephone  numbers 
  372.                          for your modem.
  373.  
  374. Select  the [RS232] item in the [Settings] menu and a new dialog will  appear. 
  375. Selecting  the different values for the parameters is quite  straight-forward, 
  376. just  click  on  the buttons with the right values (we  hope  you  know  them, 
  377. otherwise  you will just have to experiment) and when you are finished  select 
  378. [OK].   To save the setup,  select [Save setup] from the [File] menu, a normal 
  379. GEM  file  selector  dialog will appear,  if you want to  use  this  setup  as 
  380. default,  save  it  with  the  name  UNITERM.SET  and  UniTerm  will  load  it 
  381. automatically on startup.  To leave the help screen select [Quit Menu],  press 
  382. <Q> or the left mouse button once.
  383.  
  384. 2.3.   EXITING UNITERM                                                       5
  385.  
  386.  
  387. If  you  have adjusted the parameters correctly,  you should now  be  able  to 
  388. communicate  with  your  host  computer.    Some operating systems  (VMS)  try 
  389. to identify the terminal automatically,  depending on your setup UniTerm  will 
  390. identify  itself as a DEC VT200,  VT102,  VT100 or  as a VT100   emulating   a 
  391. VT52.   A VT102/VT200 has more 'advanced' editing functions (which results  in 
  392. less  overhead  in  transmitting  inserts  etc.)  so  leave  this  option   on 
  393. VT102/VT200 if  possible.  If you have to enter the terminal type manually try  
  394. VT102   first  (changing  from VT102 to VT100 or to VT200  only  changes   the  
  395. report  from UniTerm, not the actual commands UniTerm understands).
  396.  
  397.  
  398.  
  399. 2.3         Exiting  UniTerm
  400.  
  401.  
  402. To  stop UniTerm,  press the <Undo> key,  an alertbox will appear  asking  for 
  403. confirmation (<Alt><Undo> exits immediatly).
  404.  
  405.  
  406.  
  407. 2.4         Vector  Graphics  Mode
  408.  
  409.  
  410. After  receiving the control code GS (this can be turned off)  or   the   4105 
  411. command ESC %!0 from the host, UniTerm switches to a separate graphics screen, 
  412. if the host doesn't send  ESC  FF   (the ASCII characters Escape and Formfeed) 
  413. before  starting  a new picture,  you will have to clear the  screen  manually  
  414. with  <Alt><F1>.    The  incoming  characters will be interpreted as Tektronix 
  415. encoded  vectors or commands  (see  appendix A) until UniTerm receives one  of 
  416. the following codes:
  417.  
  418.      CAN  will return you to VT102 mode,
  419.  
  420.      ESC  FF  will clear the screen and enter Tektronix alpha mode.
  421.  
  422.      ESC %!1 will return to VT102 mode.
  423.  
  424. To  return  manually  from  Tektronix  to  VT200/VT102/VT100/VT52  mode  press  
  425. <Alt><F6>   or select the appropriate mode from the item Terminal in the  menu 
  426. Settings.  To view your picture again press <Alt><F5>.   Be  careful,selecting 
  427. Tektronix 4010 mode manually will also reset the history buffer!
  428.  
  429.  
  430. 2.5         Zoom  Mode
  431.  
  432. If  your  history  buffer  is large enough,  you can  redraw  a  picture  with 
  433. different scaling factors.   To select this mode press  <Alt><F9>,  the screen 
  434. will be cleared,
  435.  
  436. 6                                           CHAPTER 2.  STARTING USING UNITERM
  437.  
  438.  
  439.  
  440. the current contents of the buffer will be drawn on the screen and the  normal 
  441. arrow mouse cursor will appear.
  442.  
  443. To select the region of the picture you want to magnify, move the arrow to the 
  444. upper  left corner of the region,  press the left mouse button and  drag   the 
  445. mouse  to the lower right corner of the region (a "rubber box"  should  follow 
  446. the  arrow) and release the button.  The resulting picture will be  scaled  so 
  447. that the larger side of box will fit on the screen (if the option True  Aspect 
  448. is  selected).  You can repeat this operation until a magnification factor  of 
  449. thirty is reached.
  450.  
  451. <Backspace> will restore the previous scaling factor, the arrow keys will move 
  452. the  screen a third of the screen width/height in their  direction,   <Return> 
  453. will reset to the original scaling and  <Undo>  will leave zoom mode. Remember 
  454. that  if your picture is built out a lot of vectors,  the redrawing  may  take 
  455. some time!
  456.  
  457.  
  458.  
  459. 2.6         GIN Mode
  460.  
  461.  
  462. The   sequence    ESC    SUB    will  enter  GIN  mode   from   any   of   the  
  463. Tektronix  modes,  it  will  not work from the  VT102/VT100  mode  since   SUB   
  464. cancels  all ANSI type commands.  A crosshair cursor will appear which can  be 
  465. moved  with  the mouse.  Pressing any key on the keyboard will  cause  a   GIN 
  466. report  to  be sent to the host and exits the GIN mode to Tektronix alpha mode 
  467. (if for some reason the program switching UniTerm into GIN mode does not stop,  
  468. you can exit completely by pressing  <Undo> ).
  469.  
  470.  
  471.  
  472. 2.7         Tektronix  4014  Alpha  Mode
  473.  
  474. This mode is only included for compatibility with the  GIN-mode  and  is   not 
  475. very useful.   It is the same as 4010 alpha mode with one margin.   This  mode 
  476. will probably be replaced in future versions with a 4105 compatible alphamode.
  477.  
  478.  
  479. 2.8         Using  the  Special  Keys
  480.  
  481.  
  482. Here  is a list of the functions on the special keys (press <Alt> and the  key 
  483. listed here to invoke the function):
  484.  
  485.  <F1>   Erases the graphics screen and resets the Tektronix emulation from any 
  486.         terminal mode.
  487.  
  488.  <F2>   Toggle 24/49 lines mode (only on monochrome monitor).
  489.  
  490.  <F3>   Write history buffer contents to a VDI-device (printer or metafile)
  491.  
  492. 2.8.   USING THE SPECIAL KEYS                                                7
  493.  
  494.  
  495.  <F4>   Prints  the contents of the textbuffer (this is a very quick  way   of  
  496.         getting  a  copy  of  the  screen  contents,  it  is  much faster than 
  497.         using the normal screen dump).
  498.  
  499.  <F5>   Switches   to   the   graphics  screen  and  sets   the   terminal  to 
  500.         Tektronix 4010 mode.
  501.  
  502.  <F6>   Switches  the  screen  and  the  terminal  to  VT102/VT100 mode.
  503.  
  504.  <F7>   Resets the terminal, reads the default values from disk.
  505.  
  506.  <F8>   Toggle autoprint.
  507.  
  508.  <F9>   Enter zoommode.
  509.  
  510.  <F10>  Toggle between 132(128) and 80 column mode.
  511.  
  512.  <A>    Send the answerback string.
  513.  
  514.  <B>    Send a short break (0.233 s) (doesn't drop DTR).
  515.  
  516.  <C>    Start/stop file capture.
  517.  
  518.  <H>    Hangup the telephone.
  519.  
  520.  <L>    Send a long break (3.5 s) (drops DTR).
  521.  
  522.  <P>    Screen dump to disk in DEGAS format.
  523.  
  524.  <R>    Playback a file with the terminal emulator.
  525.  
  526.  <S>    Control history recording.
  527.  
  528.  <T>    Start   file   transfer  (starts  file  transfer with   the   protocol 
  529.         selected in the [Transfer] menu).
  530.  
  531.  <V>    View the history buffer.
  532.  
  533.  <X>    Save history buffer to disk.
  534.  
  535.  <Z>    Hold Screen (<Y>  on the german keyboard).
  536.  
  537.  <1>-<0>    Dial numbers 1 to 10.
  538.  
  539.  <Help>     Atari screen dump.
  540.  
  541.  <Insert>   Start the single-line editor.
  542.  
  543.  <CapsLock> Toggle Meta mode.
  544.  
  545. 8                                          CHAPTER 2.   STARTING USING UNITERM
  546.  
  547.  
  548. 2.9          The Clipboard
  549.  
  550.  
  551. Pressing the left mouse button while the I-type  mouse cursor is visible  will 
  552. produce a "rubber box", after you have let go of the mouse button the selected
  553. text will be inverted and a small popup menu will appear:
  554.  
  555.         - clicking outside the popupwill cancel the operation
  556.  
  557.         - selecting the [Cut] item with the left  mouse  button will store the 
  558.           the  text in a  buffer (the  "clipboard").  Doing the  same with the 
  559.           right button will append a CR after each line.
  560.  
  561.         - [Add]  appends to the text  already in the  clipboard (with the same   
  562.           difference between left and right mouse button).
  563.  
  564.         - [Send] sends the text directly to the host  computer, without  using 
  565.           the clipboard (again same usage of left and right button).
  566.  
  567.   Two  commands  supplement this feature,  SaveClip and  Insert which are both
  568. available via the main popup menu:
  569.  
  570.         - SaveClip allows you to save the contents of the clipboard to a file,
  571.           CR's are mapped to CR LF.
  572.          
  573.         - Insert sends the contents of the clipboard to the host computer.
  574.  
  575.   Additional operations on the clipboard are possible with  seperate programs,  
  576. the  clipboard can be  accessed  via the  UniTerm  parameter  block,  example
  577. programs and documentation should be available with this manual.          
  578.  
  579.  
  580.  
  581. 2.10         Mouse  Cursor  Control
  582.  
  583.  
  584. In practically all situations where you can use the cursor keys,  you can  use 
  585. the  mouse to  position the cursor too; while the mouse cursor is visible (the 
  586. I-type text cursor) move it to a new position and double click the left  mouse 
  587. button; the cursor should  now move to the new position.  Some editors  do not
  588. allow  you  to move the  cursor over tabs, this  will cause the cursor to miss 
  589. the intended end position in some cases.
  590.  
  591.  
  592. 2.11          Popup  Menu
  593.  
  594. Besides  being  bound to keys some functions of UniTerm are accessible  via  a 
  595. popup  menu.   Click the right mouse button and the popup will appear  at  the 
  596.  
  597. 2.12   VIEWING THE HISTORY BUFFER                                            9  
  598.  
  599. current  cursor  position.  To  select one of the items just  click  the  left 
  600. button, to get rid of the  menu click  outside of the  popup area. The default
  601. configuration assigns the ten telephone numbers of the dialer to the fields on
  602. the right-hand side.
  603.  
  604.  
  605. 2.12          Viewing the History Buffer
  606.  
  607. You  can  view the  contents of the  history  buffer with the key  combination 
  608. <Alt><V>.  Besides the  normal `clip'  functions with the mouse, six keys have
  609. a special function:
  610.  
  611.         <Undo>          Exit.
  612.         <Insert>        Bottom of buffer.
  613.         <ClrHome>       Top of buffer.
  614.         <^>             Up one line. (`Up arrow')
  615.         <v>             Down one line. (`Down arrow')
  616.         <->>            Up one page.
  617.         <<->            Down one page.
  618.  
  619.  
  620. 2.13          Dialer
  621.  
  622.  
  623. The setup file UNITERM.TEL is loaded at startup,  if it isn't found the values 
  624. for  the   dialer  are  reset.   The  keys   <Alt><1>   to    <Alt><0>    dial  
  625. numbers  1  to  10, <Alt><H>  sends the hangup string.
  626.  
  627. A  '+' as first character of the number is a placeholder for the access  code. 
  628. Dialling can be aborted by pressing  <Control><C> , the timeout is 40 seconds.
  629.  
  630. The suffix,  prefix and hangup strings are passed to the macro interpreter  in 
  631. "function-key" mode.
  632.  
  633. If the number  and macro field is empty, the dialer returns  straight away, if 
  634. the  number field is empty and a  macro file is  specified, the  macro file is
  635. executed.
  636.  
  637. A tip for people  that want the macro to handle  waiting  for the `CONNECT' or
  638. whatever it may be message, just leave out the `Connect msg' entry, The dialer
  639. will then  immediatly start executing the macro file after  sending the number 
  640. string.
  641.  
  642.  
  643. 2.13          Meta  Mode
  644.  
  645.  
  646. In  Meta mode  <Alternate> is the so called Meta  key;  pressing   <Alternate> 
  647. plus  a  second key will produce the ASCII code of that letter plus  128  (the 
  648.  
  649. 10                                           CHAPTER 2. STARTING USING UNITERM
  650.  
  651. Meta  key  sets the eighth bit of the character).  To enter  Meta  mode  press 
  652. <Alt><CapsLock> (this will toggle an indicator on the statusline).  
  653.  
  654. Some  of the more  important  characters of the   international  character set 
  655. that can be generated are:
  656.  
  657.             ______________________________________________________________
  658.             |____Meta_+___|____Character___|______Meta_+__|___Character__|
  659.             |      @      |                |        `     |              |
  660.             |      A      |                |        a     |              |
  661.             |      B      |                |        b     |              |
  662.             |      C      |                |        c     |              |
  663.             |      D      |                |        d     |              |
  664.             |      E      |                |        e     |              |
  665.             |      F      |                |        f     |              |
  666.             |      G      |                |        g     |              |
  667.             |      H      |                |        h     |              |
  668.             |      I      |                |        i     |              |
  669.             |      J      |                |        j     |              |
  670.             |      K      |                |        k     |              |
  671.             |      L      |                |        l     |              |
  672.             |      M      |                |        m     |              |
  673.             |      N      |                |        n     |              |
  674.             |      O      |                |        o     |              |
  675.             |      Q      |                |        q     |              |
  676.             |      R      |                |        r     |              |
  677.             |      S      |                |        s     |              |
  678.             |      T      |                |        t     |              |
  679.             |      U      |                |        u     |              |
  680.             |      V      |                |        v     |              |
  681.             |      W      |                |        w     |              |
  682.             |      X      |                |        x     |              |
  683.             |      Y      |                |        y     |              |
  684.             |      Z      |                |        z     |              |
  685.             |      [      |                |        {     |              |
  686.             |      ~      |                |        -     |              |
  687.             |      ]      |                |        }     |              |
  688.             |      _      |                |              |              |
  689.             |_____________|________________|______________|______________|
  690.  
  691. If  you have a non-US keyboard,  you will probably have to edit  your  UniTerm 
  692. setup file with KeyEdit to get all ASCII codes.
  693.  
  694.  
  695. Chapter   3
  696.  
  697.  
  698.  
  699. More   About   UniTerm
  700.  
  701.  
  702.  
  703. This  chapter  contains a short description of  all  user-setable  parameters, 
  704. except  those  related to the various file  transfer  protocols.  Please  read 
  705. Chapter 4 for more information.
  706.  
  707.  
  708.  
  709. 3.1         RS232  Port Parameters
  710.  
  711.  
  712. To  change  these  settings,  press    <Help>  and  select  [RS232]  from  the 
  713. [Settings] menu. Following parameters can be changed:
  714.  
  715. Baud
  716.         selects the rate for the serial port.
  717.  
  718. Flowcontrol
  719.         selects  the  flowcontrol  mode,   these  functions  are   implemented  
  720.         by  the BIOS.
  721.  
  722. Parity
  723.         selects the parity mode, these modes are implemented by the BIOS.
  724.  
  725. Databits
  726.         allows you to selectthe number of data bits, implemented by the BIOS.
  727.  
  728. Stopbits
  729.         allows you to select the number of stop bits, implemented by the BIOS.
  730.  
  731. Mode
  732.         allows you to put the terminal in one of following modes:
  733.  
  734.         [Full]  Data typed on the terminal is echoed by
  735.                 the host computer.
  736.  
  737. 12                                              CHAPTER 3.  MORE ABOUT UNITERM
  738.  
  739.         [Echo]    UniTerm echos user input on the screen.
  740.  
  741.         [Local]   User input is only sent to the screen.
  742.  
  743.  
  744.  
  745. 3.2         Terminal Parameters
  746.  
  747.  
  748. To change these settings, press <Help> and select [Terminal 1] or [Terminal 2] 
  749. from the [Settings] menu, the following parameters can be changed:
  750.  
  751.  
  752.  
  753. 3.2.1        Terminal 1
  754.  
  755. Terminal
  756.         selects  the  terminal mode and change  the  terminal  identification. 
  757.         [4014] selects 4014 alpha mode, [DCM] selects Display Control Mode3
  758.  
  759. Keypad
  760.         chooses the mode of the keypad,  in application mode escape  sequences 
  761.         are sent by all keys,  in numeric mode only the top 4 keys send escape 
  762.         codes (they are the keys F1 to F4 on a real VT100).
  763.  
  764. Cursormode
  765.         selects the two different sets of escape sequences that can be sent by 
  766.         the cursor keys.
  767.  
  768. Use
  769.         masks  out  the  8th bit of sent or received bytes  for  the  terminal         
  770.         emulations,  set  to  8 bits if you want to use the 8 bit  VT2XX  mode         
  771.         (this only effects ASCII file transfer and not the other file transfer 
  772.         modes).
  773.  
  774. Scroll
  775.         selects between slow and quick scroll.
  776.  
  777. Newline  Mode
  778.         sets   the  VT100/102/200  newline  mode  (what  is  sent   when   you          
  779.         press <Return> ).
  780.  
  781. Wrap
  782.         switches the automatic wraparound at the end of a line on and off.
  783.  
  784. Cursor
  785.         selects blinking or non blinking, underline or block cursor.
  786.  
  787. Background
  788.         sets the background (and naturally the foreground) color
  789.  
  790. 3.2.   GRAPHICS TERMINAL PARAMETERS                                         13
  791.  
  792.  
  793. Delete
  794.         changes  the  way   <Backspace>   and   <Delete>   work,   if  set  to         
  795.         [Delete]  <Backspace> will send BS and Delete will send  DEL,  set  to         
  796.         [Backspace], the codes are exchanged.
  797.  
  798.  
  799. 3.2.2        Terminal 2
  800.  
  801. Answerback
  802.         is the string which is sent as answerback message.
  803.  
  804. Printer
  805.         determines if a printer is connected or not.
  806.  
  807. Print terminator
  808.         determines if a  FF  is sent after each print operation or not.
  809.  
  810. SLE
  811.         turns the built-in single-line editor on and off.
  812.  
  813. Auto executed macro
  814.         The  contents  of any file named here are executed on startup  by  the 
  815.         UniTerm macro processor
  816.  
  817. NRC     
  818.         turns  national replacement character set mode  on, and controls which 
  819.         character set is used (selecting ASCII turns it off).
  820.  
  821.  
  822. 3.3         Graphics  Terminal  Parameters
  823.  
  824.  
  825. Select  [Graphics]  from the [Settings] menu to change the parameters  of  the 
  826. graphic terminal module:
  827.  
  828. Tektronix mode
  829.         enables or disables automatic switching to the Tektronix mode after  a 
  830.         GS character, useful  on  noisy  telephone  lines  (this  option  also 
  831.         inhibits  the allocation of a 32kB buffer for the Tektronix screen).
  832.  
  833. GIN Termination String
  834.         sets the string sent after a GIN report.
  835.  
  836. Status Termination String
  837.         sets the string sent after a status report.
  838.  
  839. 14                                              CHAPTER  3. MORE ABOUT UNITERM
  840.  
  841.  
  842. Aspect
  843.         this option controls the scaling of pictures.
  844.  
  845. Deletes
  846.         allows you to set the processing of DEL in the 4010 module.
  847.  
  848. 3.4         Tabs
  849.  
  850.  
  851. This small dialog allows you to set the tab positions.  Generally it is not  a 
  852. good  idea to change them from the default settings,  since there is a lot  of 
  853. (buggy)  software that relies on the settings being the same as  the  original 
  854. VT100 factory settings.
  855.  
  856.  
  857. 3.5         Changing  Buffer  Sizes
  858.  
  859.  
  860. Select  [Buffers] from the [Settings] menu,  the top half of the  dialog  form 
  861. allows you to change four values:
  862.  
  863.      * Transfer buffer size
  864.  
  865.      * RS232 input buffer size
  866.  
  867.      * System reserved size
  868.  
  869.      * Clipboard size
  870.  
  871. the   [+]  and  the  [-]  buttons  autorepeat,   double   clicking   increases  
  872. (decreases) the displayed value by 1000.
  873.  
  874. In  the  bottom half the actual amount of memory allocated to each  buffer  is 
  875. displayed,  if these values are not the same as the ones set by you,  for some 
  876. reason UniTerm was not able to use your configuration.   In this case 5kB  are 
  877. reserved   for  system use, 2kB for the  clipboard and  the rest of  available 
  878. memory is  allocated  to  the transfer  buffer (up to the  amount  set by you, 
  879. minimum 1kB) and the remaining memory is used by the history buffer (min.1kB).
  880.  
  881. The RS232 buffer values will only change if you save the value in a setup file 
  882. and restart UniTerm,  all other changes take effect immediately (and reset the 
  883. buffers!).
  884.  
  885.  
  886. 3.6         Setup  Files
  887.  
  888.  
  889. All  user  setable  parameters are stored in the setup  files  (including  the 
  890. function  key  strings  etc.).    Loading  a  setup  file  from  a   different  
  891. version   of UniTerm may result in a version conflict error message,  if  this 
  892. happens UniTerm uses its internal defaults.
  893.  
  894.  
  895. 3.7     FILE CAPTURE/PLAYBACK                                               15
  896.  
  897. 3.7         File Capture/Playback
  898.  
  899. The  file  capture routine uses a character  translation  table,  whichcan  be 
  900. edited by selecting [ASCII] from the [Transfer] menu and then selecting  [File 
  901. Transfer] from the [Settings] menu.
  902.  
  903. While file capture is in progress all screen output is translated too,  so you 
  904. will get a direct impression of what you are saving.
  905.  
  906. The  Playback  function allows you to simulate input from  the  serial   port, 
  907. pressing  A  allows you to abort, any other key will cause UniTerm to wait for 
  908. another keypress.
  909.  
  910.  
  911. 3.8         Editing  Function  Keys
  912.  
  913.  
  914. To  edit  the string assigned to a function key,  press the  <Help>   key  and 
  915. select  [Edit Function Keys] from the [Other] menu.  You can edit the  strings 
  916. now, the cursor keys will move you to the string you want to edit,  <Esc> will 
  917. clear the string,  <Backspace> will delete to the left,  <Delete> the  current  
  918. character.  Control  codes  can be entered by pressing   <Control>    and  the 
  919. appropriate key (see appendix B).
  920.  
  921.  
  922.  
  923. 3.9          The  Statusline
  924.  
  925.  
  926. The 25th line on the screen is used as a statusline in text terminal mode,  it 
  927. should look like this (all possible information shown):
  928.  
  929. ______________________________________________________________________________
  930. |__UniTerm__V2.0c___Online________Meta_______Caps______HPDBLCR__________1234_|
  931. ______________________________________________________________________________
  932. |  Program  Version  Mode         Meta       Caps      Status           LED  |
  933. |__name___________________________Ind._______Ind.____________________________|
  934.  
  935. The "Status LED's" are (from left to right):
  936.                                 __________________________________________
  937.                                 |_____________________|____On___|__Off___|
  938.                                 |  History            |     H   |    _   |
  939.                                 |  Autoprint          |     P   |    _   |
  940.                                 |  DCD                |     D   |    _   |
  941.                                 |  Break              |     B   |    _   |
  942.                                 |  Keyboard locked    |     L   |    _   |
  943.                                 |  File Capture       !     C   |    _   |
  944.                                 |__Insert_Mode________!_____I___|____R___|
  945.  
  946.  
  947. 3.10          The  Single-line  Editor
  948.  
  949.  
  950. To make working on systems that don't have a single-line editor  (short   sle) 
  951. easier, a simple sle is implemented in UniTerm. The last 20 lines typed by the
  952.  
  953. 16                                              CHAPTER  3. MORE ABOUT UNITERM
  954.  
  955. user are stored in a circular buffer.  Pressing <Insert> starts the  sle,  the 
  956. status  line will clear and the current line will be  displayed  instead.  The  
  957. following functions are provided:
  958.  
  959.   <->>  move the cursor one character to the right.
  960.  
  961.   <<->  move the cursor one character to the left.
  962.  
  963.   <^>   display the previous line.
  964.  
  965.   <v>   display the next line.
  966.  
  967.   <Delete>     delete the character under the cursor.
  968.  
  969.   <Backspace>  delete the character to the left of the cursor.
  970.  
  971.   <Insert>     terminate the sle without sending the current line.
  972.  
  973.   <Return>     send the current line and leave the sle.
  974.  
  975. The sle is always in insert mode. DON'T FORGET TO ERASE YOUR PASSWORDS! If you 
  976. want to disable the sle for this reason,  disable it in the [Terminal]  dialog 
  977. box.
  978.  
  979.  
  980.  
  981. 3.12           Single  Character  Commands
  982.  
  983.  
  984. All  functions  in the 'Help' menu of UniTerm can used with  single  character 
  985. commands:
  986.  
  987.                            1       Set terminal parameters part 1
  988.                            2       Set terminal parameters part 2
  989.                            A       Set ASCII file transfer parameters
  990.                            B       Set buffer sizes
  991.                            C       Configure dialer
  992.                            D       Delete file
  993.                            E       Edit function-keys
  994.                            F       Show free diskspace
  995.                            G       Set graphic parameters
  996.                            I       Show info dialog
  997.                            K       Set Kermit parameters
  998.                            L       Load Setup
  999.                            P       Set Path
  1000.                            R       Run program
  1001.                            S       Save Setup
  1002.                            T       Set tabs
  1003.                            Q       Quit 'help' dialog
  1004.                            V       Set RS232 parameters
  1005.                            X,Y     Set X/YModem parameters
  1006.  
  1007.  
  1008. Chapter   4
  1009.  
  1010.  
  1011.  
  1012. File   Transfer
  1013.  
  1014.  
  1015.  
  1016. 4.1         General
  1017.  
  1018.  
  1019. To  change the current file transfer mode use the [Transfer]  menu.   Changing 
  1020. the file transfer type here, changes the dialog box that is displayed when you 
  1021. select [File Transfer] from the [Settings] menu and what happens when you type 
  1022. <Alt><T>  (start file transfer).
  1023.  
  1024.  
  1025.  
  1026. 4.2         ASCII  File  Transfer
  1027.  
  1028.  
  1029. 4.2.1        Using  ASCII  File  Transfer
  1030.  
  1031. There  is nothing much to say about ASCII file transfer,just  press   <Alt><T>  
  1032. and choose the file you want to send.  Pressing  <Help>  gets you to the  Help 
  1033. screen,  so  you can change the delay between characters to a different  value 
  1034. during an upload (this is useful with VMS which normally has a lot of  trouble 
  1035. with  the first line sent).   The transfer can be interrupted at any  time  by 
  1036. pressing   A.  Normally  some experimentation is needed to find  the  shortest 
  1037. delay time for your system.  You can use a character translation table to  map 
  1038. incoming characters to Atari characters.
  1039.  
  1040. To receive files use the file capture function.   A translation table is  used 
  1041. in  the  same way as with sending files.  When file capture is in  effect  the 
  1042. characters are displayed as they will be saved.
  1043.  
  1044.  
  1045.  
  1046. 4.2.2        Setting  the  ASCII  File  Transfer  Parameters
  1047.  
  1048. The following parameters can be set:
  1049.  
  1050.  
  1051. Start of file transfer
  1052.         a string that is sent before file transfer starts.
  1053.  
  1054. 18                                                   CHAPTER 4.  FILE TRANSFER 
  1055.  
  1056. End of file transfer
  1057.         a string that is sent when the transfer finishes.
  1058.  
  1059. Send
  1060.         determines if the output translation table is used for sending files.
  1061.  
  1062. Receive
  1063.         determines if the input translation table is used for capturing files.
  1064.  
  1065. Delay  Time
  1066.         sets  the time [ms] UniTerm waits after every character sent (this  is         
  1067.         implemented with the 200Hz system clock.
  1068.  
  1069. Method
  1070.         if [Paced by Echo] is selected, UniTerm waits for every character sent         
  1071.         to be echoed (except ASCII control codes), this doesn't time out!
  1072.  
  1073. Translate EOL to
  1074.         selects  if CR  LF  is sent as CR LF ,   CR ,   LF  or as    SP    CR.  
  1075.         This function will send single  CR 's and  LF 's correctly!
  1076.  
  1077. Translation on input
  1078.         allows you to change the translation table used during file capture
  1079.  
  1080. Translation on output
  1081.         enables  you to edit the translation table which is used  for  sending         
  1082.         files,  enter the decimal ASCII values of the characters or nothing if         
  1083.         you want the character to be ignored.
  1084.  
  1085.  
  1086.  
  1087. 4.3         XModem/YModem
  1088.  
  1089.  
  1090. 4.3.1        Using  XModem
  1091.  
  1092. To receive a file,  start the remote XModem and type  <Alt><T>.   To receive a 
  1093. file  select [Receive] from the dialog box and enter the filename in the  file 
  1094. selector form.  If you have set the error check mode to [CRC] UniTerm will try 
  1095. to  initiate a file transfer with CRC error check,  if it gets no response  in 
  1096. the maximum allowed number of errors,  it will retry with the normal checksum. 
  1097. To  send  a  file select [Send] and enter the name of the  file  in  the  file 
  1098. selector.
  1099.  
  1100. 4.4  KERMIT                                                                 19
  1101.  
  1102.  
  1103. 4.3.2        Using  YModem  Batch
  1104.  
  1105. YModem is a version of the XModem protocol with CRC type block check and  with 
  1106. a batch send/receive protocol added.  The file length will be set to the value 
  1107. received in the header block, file date and time is set to 0 and the attribute 
  1108. to  000644  (octal) on sending and ignored on  receiving.  Filename  collision 
  1109. handling  and  wildcard  expansion are done on receiving/sending  a  group  of 
  1110. files.
  1111.  
  1112.  
  1113.  
  1114. 4.3.3        Setting  the  XModem  Parameters
  1115.  
  1116. The following parameters can be set:
  1117.  
  1118.  
  1119. Timeout after
  1120.         sets the maximum time XModem waits for a character to be received from 
  1121.         the serial port.
  1122.  
  1123. Maximum number of errors
  1124.         sets the maximum number of errors before the file transfer is aborted.
  1125.  
  1126. Accept ASCII NUL
  1127.         allows you to use XModem for non-binary  file  transfers,  when  ASCII 
  1128.         NUL  is used as padding character.
  1129.  
  1130. Packet size
  1131.         chooses the packet size for XModem transfers, the 1kB size may be more 
  1132.         efficient on noise free lines.
  1133.  
  1134. Error check type
  1135.         sets the default checksum type,  if possible use the CRC check for the         
  1136.         larger packet size.
  1137.  
  1138.  
  1139.  
  1140. 4.4         Kermit
  1141.  
  1142.  
  1143. 4.4.1        UniTerm  Kermit  Capabilities
  1144.  
  1145. UniTerm Kermit capabilities at a glance:
  1146.  
  1147.  
  1148.           Local operation:                                     Yes
  1149.           Remote operation:                                    No
  1150.           Transfers text files:                                Yes
  1151.           Transfers binary files:                              Yes
  1152.           Wildcard send:                                       Yes
  1153.           ^X/^Y interruption:                                  No
  1154.           Filename collision avoidance:                        Yes
  1155.           Can time out:                                        Yes
  1156.           8th-bit prefixing:                                   Yes
  1157.  
  1158. 20                                                    CHAPTER 4. FILE TRANSFER
  1159.  
  1160.           Repeat count prefixing:                              Yes
  1161.           Alternate block checks:                              Yes
  1162.           Terminal emulation:                                  Yes (UniTerm)
  1163.           Communication settings:                              Yes (UniTerm)
  1164.           Transmit BREAK:                                      Yes (UniTerm)
  1165.           IBM mainframe communications:                        Yes
  1166.           Transaction logging:                                 No
  1167.           Session logging:                                     No
  1168.           Act as server:                                       No
  1169.           Talk to server:                                      Yes
  1170.           Advanced server functions:                           No
  1171.           Advanced commands for servers:                       Yes
  1172.           Local file management:                               Yes
  1173.           Handle file attributes:                              Yes
  1174.           Command/init files:                                  Yes (UniTerm)
  1175.           Command macros:                                      Yes (UniTerm)
  1176.           Large packets:                                       Yes
  1177.           Windows:                                             No
  1178.  
  1179.  
  1180.  
  1181. Please don't forget if you miss a feature,that UniTerm is a terminal  emulator 
  1182. and not a "real" Kermit (whatever that maybe).
  1183.  
  1184.  
  1185.  
  1186. 4.4.2        Simple  File  Transfer
  1187.  
  1188. To  receive a file,  type the correct command for the remote Kermit  and  type 
  1189. <Alt><T>   on  the  ST keyboard,  a large dialog  box  should  appear.  Select 
  1190. [Receive]  if you want to use a different name than the original filename  use 
  1191. the  file selector form  to  select  a  name  (this  will  only   effect   the  
  1192. first  file  received  in  a  mutiple file transfer).   If you want to receive 
  1193. the files with the names supplied by the host,  just press <Return> (the  path 
  1194. entered is retained untill the end of your UniTerm session).   A new form will 
  1195. appear and will display the current file being received,   the total number of 
  1196. packets,  the  current  number of errors and timeouts and the  last  non-fatal 
  1197. error that occurred. The transfer can be aborted by typing  <Control><C>.
  1198.  
  1199. To  send  a  single  file or a group of  files,  setup  the  remote  host  for 
  1200. receiving, type  <Alt><T>  and select [Send].  Enter the filename or wildcards 
  1201. (*,?) in the file selector dialog and press  <Return>.
  1202.  
  1203.  
  1204.  
  1205. 4.4.3        Binary  File  Transfer
  1206.  
  1207. Set  both sides (host and local computer) to binary mode (on  most  mainframes 
  1208. with set  file  type  binary or set  file  binary,  select the [Binary] button 
  1209.  
  1210. 4.4  KERMIT                                                                 21
  1211.  
  1212. on  UniTerm),  if you have set parity to none and have selected 8  data  bits, 
  1213. binary files will be transferred without 8th-bit prefixing; in all other cases 
  1214. prefixing  will be used (be sure that the parity is the same on  the  complete 
  1215. connection  to  the remote computer).   One note,  since the  Kermit  "end  of 
  1216. record" is the same as the TOS "end of line" no translation of  CR's or   LF's 
  1217. is done,  this may lead to problems if you have a file on the ST which uses LF 
  1218. as 'end of line' marker.
  1219.  
  1220.  
  1221. 4.4.4        Server Commands
  1222.  
  1223. This  is probably the simplest way to use Kermit,  connect to the remote  host 
  1224. and  start the remote Kermit in server mode.  A large subset of  the  possible 
  1225. Kermit  server  commands  is  implemented  (not  implemented:   Journal,  Who, 
  1226. Variable):
  1227.  
  1228.        Put          send a file to the host.
  1229.        Get          receive a file from the host.
  1230.        Finish       terminate the remote Kermit.
  1231.        Logout       terminate the remote Kermit and logout.
  1232.        Dir          send  a  directory  to  the  local  Kermit  and  have   it 
  1233.                     displayed on the screen (argument:  file-spec).
  1234.        Remote       send   a   command   to   the   remote   host   (argument: 
  1235.                     commandline).
  1236.        Type         send  a  file  to  the  local  Kermit  and  display  it on 
  1237.                     the screen (argument: file).
  1238.        CWD          change the current working directory of the remote  Kermit 
  1239.                     (arguments: directory, password).
  1240.        Usage        show disk usage (argument: area).
  1241.        Program      start a program on the host computer (arguments:  program-
  1242.                     file, program-commands).
  1243.        Erase        delete a file on the host computer (argument: file).
  1244.        Copy         copy   a   file   on   the   host   computer   (arguments: 
  1245.                     source, destination).
  1246.        Rename       rename   a   file  on  the   host   computer   (arguments: 
  1247.                     oldname, newname).
  1248.        Login        login   on   a  remote  Kermit  in  server   mode   (argu-                      
  1249.                     ments: user, password, account).
  1250.        Help         get help from the remote host (argument: topic).
  1251.        Status       get the current status of the server.
  1252.  
  1253.      For more information consult the "Kermit Protocol Manual".
  1254.  
  1255.  
  1256. 4.4.5        Setting  the  Kermit  Parameters
  1257.  
  1258. The following parameters can be set:
  1259.  
  1260. 22                                                   CHAPTER 4.  FILE TRANSFER
  1261.  
  1262.  
  1263. Timeout after
  1264.         sets the maximum time Kermit waits for a character to be received from 
  1265.         the serial port.
  1266.  
  1267. Maximum number of retries
  1268.         the maximum number of retries before the transmission is aborted.
  1269.  
  1270. Number of padding characters
  1271.         the number of padding characters sent before each packet.
  1272.  
  1273. Packet size
  1274.         the  maximum packet size you want to use (maximum size  without  large 
  1275.         packets is 94 bytes, with 2048).
  1276.  
  1277. Quote  character
  1278.         the ASCII character used for control character quoting.
  1279.  
  1280. 8 bit quote character
  1281.         the ASCII character used for 8th-bit quoting.
  1282.  
  1283. Repeat prefix character
  1284.         the character used for repeat prefixing.
  1285.  
  1286. Padding  character
  1287.         the character used for padding.
  1288.  
  1289. Start of packet
  1290.         the character that marks the start of a Kermit packet.
  1291.  
  1292. IBM  mode
  1293.         wait  for  a  XOn  character before sending a packet  (XOn/XOff  flow-
  1294.         control naturally has to be turned off for this to work).
  1295.  
  1296. Error check type
  1297.         two and single character checksum and CRC check.
  1298.  
  1299.  
  1300. Normally you shouldn't have to change any of these parameters,  please consult 
  1301. the Kermit literature for more details.
  1302.  
  1303.  
  1304. Chapter   5
  1305.  
  1306.  
  1307.  
  1308. Customizing   UniTerm
  1309.  
  1310.  
  1311.  
  1312. UniTerm can be adjusted to suit your needs in various ways, most use the setup 
  1313. files to store the configuration data.  The popup menu and the bindings of the 
  1314. <Alternate>  keys are exceptions, mainly since there would have been no way of 
  1315. editing  these settings without making UniTerm simply too  large.   The  popup 
  1316. menu  and function keys can be set by executing UniTerm macro commands in  the 
  1317. auto startup macro file.
  1318.  
  1319.  
  1320.  
  1321. 5.1         Popup Menu
  1322.  
  1323.  
  1324. A line like
  1325.      %POPUP(1,15,'L. Break')
  1326. in your startup macro file will assign the command LongBreak to the top  left-
  1327. hand  entry in the popup and will name the command  'L.  Break',  consult  the 
  1328. chapter on the macro commands for a complete description.
  1329.  
  1330.  
  1331.  
  1332. 5.2         Key Bindings
  1333.  
  1334.  
  1335. A line like
  1336.      %REASSIGN(39,15)
  1337. in   your   startup  macro  file  will  assign  the   command   LongBreak   to  
  1338. <Alternate><Space>  ,  to find out which keycode to use please  consult  other 
  1339. literature.  Be-ware: in some cases the  <Alternate> key modifies the value of 
  1340. the returned keycode.   To override the default key bindings,  set the command 
  1341. number to zero, this causes the character generated by the BIOS to be used for 
  1342. output.
  1343.  
  1344.  
  1345. Chapter   6
  1346.  
  1347.  
  1348.  
  1349. Implementation   Notes
  1350.  
  1351.  
  1352.  
  1353. 6.1         General
  1354.  
  1355.  
  1356.  
  1357. Most of UniTerm is written in CCD/OSS Pascal and uses standard  GEM,  GEM-Dos, 
  1358. Bios and XBios calls.  The exceptions are:
  1359.  
  1360.      *  Scrolling,  this is  done with a  assembler routine  instead of raster 
  1361.         operations.
  1362.  
  1363.      *  Character  output in the 128 column,  DW and DH modes,  is  done  with 
  1364.         TXTBLT  (which doesn't help very much speedwise),  all other  terminal 
  1365.         mode output is done with fast custom assembler routines,  which are at 
  1366.         least an order of magnitude faster when using text attributes than the 
  1367.         corresponding TXTBLT calls.
  1368.  
  1369.      *  Some  miscellaneous routines, like CRC  calculation,  supervisor peeks  
  1370.         pokes.
  1371.  
  1372.      Timing information for the main loop of UniTerm:
  1373.  
  1374.          0.2  mS   RS232 state, keyboard and mouse state
  1375.          If characters can be read from the serial port:
  1376.          0.18 mS   Cursor on/off (disabling the cursor saves this)
  1377.          Innerloop (max. 20 iterations):
  1378.          0.1 mS    Character read (possibly slower)
  1379.          0.3 mS    Character output
  1380.                    (VT100 mode 80 clumns, no attributes set)
  1381.  
  1382. Turning  history  recording on will naturally make the loop slower,  scrolling 
  1383. speed is 42 lines per second.
  1384.  
  1385. 6.2  VT102/VT100 MODE                                                       26
  1386.  
  1387. The  carrier  detect signal and the break bit on the Mfp are polled  once  per 
  1388. main loop and if they are present a appropriate message is displayed.
  1389.  
  1390. UniTerm needs one VBL interrupt slot and also installs its own  mouse-movement 
  1391. interrupt handler in GIN mode, additionaly VDI mouse-movement and mouse-button
  1392. handlers are  installed.  The  mouse-button  handler  may cause  problems with 
  1393. programs that use both buttons, since it maps both to the left button (this is 
  1394. a workaround AES's inability to wait for a left or right mouse-button event).
  1395.  
  1396. Please note that unlike other available products,  UniTerm does  NOT use
  1397. any undocumented locations or functions of the operating system.
  1398.  
  1399.  
  1400. 6.2         VT102/VT100 Mode
  1401.  
  1402.  
  1403. 6.2.1        Smooth  Scrolling
  1404.  
  1405. Only  works  upwards  (this is hopefully the  only  direction  anybody  really 
  1406. needs), this will be fixed the day I get a blitter.
  1407.  
  1408.  
  1409. 6.2.2        132  Column  Mode
  1410.  
  1411. Only 128 columns wide, this is due to the 640 pixel resolution  of  the  ST in
  1412. horizontal direction. 
  1413.  
  1414.  
  1415. 6.2.3        Double  Height/Width  Characters
  1416.  
  1417. Restrictions: no double width in color.
  1418.  
  1419.  
  1420. 6.2.4        Extended  character  set  in  8  bit  mode
  1421.  
  1422. Using  the GR character set will work,  but is probably very slow due  to  the 
  1423. fact that the font has to be set/reset for every character.
  1424.  
  1425.  
  1426. 6.3         VT200 Mode
  1427.  
  1428.  
  1429. 6.3.1        VT200  function  keys
  1430.  
  1431. There is no default assignment of the VT200 function keys to ST keys,   except 
  1432. for the downloadable function key strings.  If you need the default VT200 keys 
  1433. (->appendix E), build yourself a setup file with the right settings.
  1434.  
  1435.  
  1436. 26                                            CHAPTER 6.  IMPLEMENTATION NOTES
  1437.  
  1438. 6.3.2        C0/C1 Modes
  1439.  
  1440. Not implemented, that means UniTerm always sends C0 codes (7 bit) (this only a 
  1441. restriction for the escape sequences sent by the cursor and keypad  keys,  you 
  1442. can send 8 bit codes from the keyboard), received C1 codes will be interpreted 
  1443. correctly.
  1444.  
  1445.  
  1446. 6.3.3        International  character  set
  1447.  
  1448. The international character set is the default GR set (the characters that are 
  1449. between ASCII 128 and 256).   For technical reasons use of the GR set is  slow 
  1450. (the set is changed for every character!).
  1451.  
  1452.  
  1453. 6.3.4        Downloadable  character  set
  1454.  
  1455. Not implemented (very resolution dependent, useless on the ST).
  1456.  
  1457.  
  1458. 6.3.5        Downloadable  function  keys
  1459.  
  1460. The lock/unlock/erase parameters are ignored.   The mapping of the keys is de-
  1461. scribed  in app endix E,maximum string length per key is 80 characters  (DON'T 
  1462. FORGET THAT % IS A SPECIAL CHARACTER FOR UNITERM!).
  1463.  
  1464.  
  1465. 6.3.6        Regis
  1466.  
  1467. Not implemented (very resolution dependent, useless on the ST).
  1468.  
  1469.  
  1470. 6.4         Tektronix Mode
  1471.  
  1472.  
  1473. 6.5         General
  1474.  
  1475. The Tektronix mode is still a bit in a mess.  This will change with the  using 
  1476. the 4105 command set, this implies that you should only use the vector mode of 
  1477. the  4010 emulation as all other 4010 commands will probably be  removed  from 
  1478. the program.
  1479.  
  1480. Right  now scaling is done with respect to a 4010 with 1024*780  points,  this 
  1481. probably will change for the 4105 (512*360) emulation.  In Tek coordinates the 
  1482. screen measures 4096*3120 points (4105:  4096*3072 points).
  1483.  
  1484. For  redrawing  and zooming purposes the incoming characters are stored  in  a 
  1485. circular buffer. This is quite a memory saving way to store them,  but  on the 
  1486. other  hand  this  means they have to be decoded every time  the  vectors  are 
  1487. drawn.
  1488.  
  1489. 6.6  PROBLEMS                                                               27
  1490.  
  1491. 6.5.1        Alpha  Mode
  1492.  
  1493. Restrictions:   1  margin,  all (well nearly all) character sizes are the same  
  1494. only the spacing is different.
  1495.  
  1496.  
  1497. 6.5.2        Vector Mode
  1498.  
  1499.  
  1500. 6.5.3        Zoom Mode
  1501.  
  1502. Restrictions:  No zooming of graph text, slow.
  1503.  
  1504.  
  1505. 6.6         Problems
  1506.  
  1507. Sometimes the serial port seems to blocked (this has happened to me with other 
  1508. ST  terminal  emulators  as  well),  the reason for  this  still  hasn't  been 
  1509. discovered (probably due to a bug in the ST Bios),  try resetting the terminal 
  1510. if this happens.
  1511.  
  1512. Don't use the [Set RS232 Port Parameters] dialog in an editor or the like, for 
  1513. some  mysterious  reason  the serial port outputs a delete  character  if  you 
  1514. actually  change something and exit with [OK](probably due to a bug in the  ST 
  1515. Bios).
  1516.  
  1517. Don't  try to use the underscore character in the file-selector dialogs  (this 
  1518. is a bug in GEM, fixed in the so called Blitter-TOS).
  1519.  
  1520.  
  1521. Appendix  A
  1522.  
  1523.  
  1524.  
  1525. Control   Codes   and   Escape   Sequences
  1526.  
  1527.  
  1528.  
  1529. This appendix lists control codes and escape sequences that complete implemen-
  1530. tations of VT102/VT2XX and Tektronix 4014/4105 terminals should interpret  and 
  1531. the functions they should initiate.   * marks functions that are redundant  or 
  1532. not  possible on an Atari ST computer,   *NI  marks  other   not   implemented 
  1533. functions (due to my laziness?),  *RI uncomplete implementation of a function, 
  1534. please read the implementation notes for details.
  1535.  
  1536. Consult the ASCII table for numeric values of the control codes,  Ps,  Pn,  Pc 
  1537. and Pl  denote decimal values ( ESC [10;10f postion cursor at text coordinates 
  1538. (10,10)).
  1539.  
  1540. The  following  control  codes  and  commands,  the  syntax  and  the  command 
  1541. interfaces as a whole could possibly be patented  or/and  copyrighted,  please 
  1542. consider  this  list as 'for information only'.  Commercial  use  is  strictly 
  1543. forbidden.
  1544.  
  1545.  
  1546.  
  1547. A.1          ANSI/VT2XX/VT102/VT100  Mode
  1548.  
  1549.  
  1550. A.1.1          Set Mode
  1551.  
  1552.        ESC [2h                Keyboard locked
  1553.        ESC [4h                Insert mode
  1554.        ESC [12h               Local echo off
  1555.        ESC [20h               New line mode on
  1556.        ESC [?1h               Cursor key application mode
  1557.        ESC [?3h               *RI 132 column mode
  1558.        ESC [?4h               *RI Smooth scrolling
  1559.        ESC [?5h               Screen reverse
  1560.        ESC [?6h               Origin mode relative
  1561.  
  1562. A.1.  ANSI/VT2XX/VT102/VT100 MODE                                           29
  1563.  
  1564.  
  1565.       ESC [?7h                Auto wrap on
  1566.       ESC [?8h                * Auto repeat on
  1567.       ESC [?9h                * Interlace on
  1568.       ESC [?18h               Print form feed on
  1569.       ESC [?19h               Print extent full screen
  1570.  
  1571.  
  1572.  
  1573. A.1.2         Reset  Mode
  1574.  
  1575.       ESC [2l                 Keyboard unlocked
  1576.       ESC [4l                 Replace mode
  1577.       ESC [12l                Local echo on
  1578.       ESC [20l                New line mo de off
  1579.       ESC [?1l                Cursor key cursor mode
  1580.       ESC [?2l                VT52 mode
  1581.       ESC [?3l                80 column mode
  1582.       ESC [?4l                Jump scrolling
  1583.       ESC [?5l                Screen normal
  1584.       ESC [?6l                Origin mode absolute
  1585.       ESC [?7l                Auto wrap off
  1586.       ESC [?8l                * Auto repeat off
  1587.       ESC [?9l                * Interlace off
  1588.       ESC [?18l               Print form feed on
  1589.       ESC [?19l               Print extent scrolling region
  1590.  
  1591.  
  1592.  
  1593. A.1.3         Select  Character  Sets
  1594.  
  1595. The format is : ESC primary final
  1596.  
  1597. Where  primary selects one of the four logical  character sets  (G0 to G3) and 
  1598. final selects the actual character set to be, mapped into the logical set.
  1599.  
  1600.  
  1601. Primary selector
  1602.  
  1603.         (               G0
  1604.         )               G1
  1605.  
  1606. Final selector
  1607.  
  1608.         A               UK national
  1609.         B               US-ASCII
  1610.         0               Special graphics
  1611.         1               *NI Alternate character set ROM
  1612.         2               *NI Alternate special graphics set ROM
  1613.  
  1614. 30                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  1615.  
  1616.  
  1617. A.1.4         Shift  into  Character  Sets
  1618.  
  1619.       SO                     Locked shift G1
  1620.       SI                     Locked shift G0
  1621.  
  1622. A.1.5         Character  Attributes
  1623.  
  1624.        ESC [0m                No attributes
  1625.        ESC [1m                Bold
  1626.        ESC [4m                Underline
  1627.        ESC [5m                Blink (Light)
  1628.        ESC [7m                Reverse
  1629.  
  1630.  
  1631.  
  1632. A.1.6          Scrolling  Region
  1633.  
  1634.        ESC [Pt;Pbr           Set scrolling region
  1635.  
  1636.  
  1637.  
  1638. A.1.7          Cursor  Movement  Commands
  1639.  
  1640.        ESC [PnA              Cursor up
  1641.        ESC [PnB              Cursor down
  1642.        ESC [PnC              Cursor right
  1643.        ESC [PnD              Cursor left
  1644.        ESC [Pl;PcH           Cursor position
  1645.        ESC [Pl;Pcf
  1646.        ESC D                 Index
  1647.        ESC M                 Reverse Index
  1648.        ESC E                 Next line
  1649.        ESC 7                 Save cursor
  1650.        ESC 8                 Restore cursor
  1651.  
  1652.  
  1653.  
  1654. A.1.8          Tab  Stops
  1655.  
  1656.        ESC H                  Horizontal tab set
  1657.        ESC [g                 Tab clear
  1658.        ESC [0g                Tab clear
  1659.        ESC [3g                Clear all tabs
  1660.  
  1661. A.1.  ANSI/VT2XX/VT102/VT100 MODE                                           31
  1662.  
  1663.  
  1664. A.1.9          Line  Attributes
  1665.  
  1666.        ESC #3                 Double-height top half
  1667.        ESC #4                 Double-height bottom half
  1668.        ESC #5                 Single-width single-height
  1669.        ESC #6                 *RI Double-width single height
  1670.  
  1671.  
  1672. A.1.10          Erasing
  1673.  
  1674. In Line
  1675.  
  1676.       ESC [K                  Cursor to end of line
  1677.       ESC [0K
  1678.       ESC [1K                 Beginning of line to cursor
  1679.       ESC [2K                 Entire line
  1680.  
  1681.  
  1682.  
  1683. In Screen
  1684.  
  1685.       ESC [J                  Cursor to end of screen
  1686.       ESC [0J
  1687.       ESC [1J                 Beginning of screen to cursor
  1688.       ESC [2J                 Entire screen
  1689.  
  1690.  
  1691.  
  1692. A.1.11          Requests/Reports
  1693.  
  1694.         Requests from host                            Reports to host
  1695.   ESC [5n          Status              ESC [0n              Terminal OK
  1696.                                        ESC [3n            * Terminal not OK
  1697.   ESC [6n          Cursor pos.         ESC [Pl;PcR          Cursor position
  1698.   ESC [c           What are you?       ESC [?1;Psc          VT100, Ps options
  1699.   ESC [0c                              ESC [?6;Psc          VT102, Ps options
  1700.   ESC Z                                ESC [?62;Psc         VT200, Ps options
  1701.   ESC [?15n        Printer status      ESC [?10n            Printer ready
  1702.                                        ESC [?11n            Printer not ready
  1703.                                        ESC [?13n            No printer
  1704.  
  1705.  
  1706.       ESC [0x                 Send terminal parameter report after setup
  1707.       ESC [1x                 Send only on request
  1708.  
  1709. 32                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  1710.  
  1711.  
  1712. A.1.12          Reset
  1713.  
  1714.       ESC c                    Reset to default values
  1715.  
  1716.  
  1717.  
  1718. A.1.13          Tests
  1719.  
  1720.       ESC #8                 Fill screen with E's
  1721.       ESC [2;Psy             * Invoke tests
  1722.  
  1723.  
  1724. A.1.14           Keyboard LED's
  1725.  
  1726.        ESC [0q                 All off
  1727.        ESC [Psq               LED Ps on
  1728.  
  1729.  
  1730.  
  1731. A.1.15           VT52 Mode
  1732.  
  1733.        ESC                     Enter ANSI Mode
  1734.        ESC =                   Enter alternate keypad mode
  1735.        ESC i                   Exit alternate keypad mode
  1736.        ESC F                   Select special graphics character set
  1737.        ESC G                   Select US/UK character set
  1738.        ESC A                   Cursor up
  1739.        ESC B                   Cursor down
  1740.        ESC C                   Cursor right
  1741.        ESC D                   Cursor left
  1742.        ESC H                   Cursor home
  1743.        ESC YPlPc               Direct cursor address
  1744.        ESC I                   Reverse line feed
  1745.        ESC K                   Erase to end of line
  1746.        ESC J                   Erase to end of screen
  1747.        ESC Z                   What are you?
  1748.        ESC /Z                  I am a VT52 (Response)
  1749.        ESC ^                   Enter auto print mode
  1750.        ESC -                   Exit auto print mo de
  1751.        ESC W                   Enter printer controller mode
  1752.        ESC X                   Exit printer controller mode
  1753.        ESC ]                   Print screen
  1754.        ESC V                   Print cursor line
  1755.  
  1756. A.1.  ANSI/VT2XX/VT102/VT100 MODE                                           33
  1757.  
  1758.  
  1759. A.1.16           Editing Functions
  1760.  
  1761.        ESC [PnP             Delete character
  1762.        ESC [PnL             Insert Line
  1763.        ESC [PnM             Delete Line
  1764.  
  1765.  
  1766.  
  1767. A.1.17           Print  Commands
  1768.  
  1769.        ESC [?5i                Enter auto print
  1770.        ESC [?4i                Exit auto print
  1771.        ESC [5i                 Enter printer controller
  1772.        ESC [4i                 Exit printer controller
  1773.        ESC [i                  Print screen
  1774.        ESC [0i
  1775.        ESC [?1i                Print cursor line
  1776.  
  1777.  
  1778.  
  1779. A.1.18          Other  Control  Characters
  1780.  
  1781.        NUL                     Ignored
  1782.        SOH                     Ignored
  1783.        ETX                     Ignored
  1784.        EOT                     Ignored
  1785.        ENQ                     Transmit answerback message
  1786.        BEL                     Bell
  1787.        BS                      Backspace
  1788.        HT                      Horizontal tab
  1789.        LF                      Linefeed or  CR    LF
  1790.        VT                      same as  LF
  1791.        FF                      same as  LF
  1792.        CR                      Carriage Return
  1793.        SO                      Shift to G1 character set
  1794.        SI                      Shift to G0 character set
  1795.        DC1                     Ignored (Alternate XOn)
  1796.        DC3                     Ignored (Alternate XOff)
  1797.        CAN                     Cancel
  1798.        SUB                     Cancel
  1799.        DEL                     Ignored
  1800.        US                      Ignored
  1801.        RS                      Ignored
  1802.        FS                      Ignored
  1803.        SYN                     Ignored
  1804.        EM                      Ignored
  1805.  
  1806. 34                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  1807.  
  1808.  
  1809.        ETB                     Ignored
  1810.        NAK                     Ignored
  1811.        DLE                     Ignored
  1812.        XON                     In XOn/XOff flow control mode
  1813.        XOFF                    intercepted by ST bios, otherwise ignored
  1814.  
  1815.  
  1816. A.1.19          Nonstandard  Functions
  1817.  
  1818.        ESC [`                  Lock Keyboard
  1819.        ESC [b                  Unlock Keyboard
  1820.        ESC [PnI                Move Pn tabs right
  1821.        GS                      Enter 4014 Vector mode
  1822.        ESC %!0                 Enter Tektronix alpha mode (4105)
  1823.        ESC #!0                 Report terminal mode (4105)
  1824.        %!  SPSP 1              Report:  I am a ANSI terminal (4105)
  1825.        ESC [?39h               Set 49 line mode
  1826.        ESC [?39l               Set 24 line mode
  1827.        ESC [?40h               Set meta mode
  1828.        ESC [?40l               Reset meta mode
  1829.        ESC [*c                 Inquire UniTerm version and mode
  1830.        Response:
  1831.        ESC [*major ;minor ;release;max-row;max-col c
  1832.        ESC Pu string ESC \
  1833.        Execute string with UniTerm's macro processor
  1834.  
  1835.  
  1836.  
  1837. A.2          VT2XX  Functions
  1838.  
  1839.  
  1840. A.2.1          Character  Sets
  1841.  
  1842. The format is: ESC primary final
  1843.  
  1844. Primary selector
  1845.  
  1846.         (               G0
  1847.         )               G1
  1848.         *               G2
  1849.         +               G3
  1850.  
  1851. Final selector
  1852.  
  1853.         <               DEC International
  1854.  
  1855. A.2.  VT2XX FUNCTIONS                                                       35
  1856.  
  1857.  
  1858.         B               US-ASCII
  1859.         0               Special graphics
  1860.  
  1861.  
  1862.  
  1863. A.2.2          Terminal  Modes
  1864.  
  1865.  
  1866.        CSI 61"p               VT100 mode
  1867.        CSI 62"p               VT200 mode, 8-bit
  1868.        CSI 62;0"p             " "
  1869.        CSI 62;1"p             VT200 mode, 7-bit
  1870.        CSI 62;2"p             VT200 mode, 8-bit
  1871.        ESCSP F                *NI Send only C0 codes
  1872.        ESCSP G                *NI SEnd only C1 codes
  1873.  
  1874.  
  1875. A.2.3         Selective  Erasing  and  Attributes
  1876.  
  1877.  
  1878.       CSI 22m                 Bold off
  1879.       CSI 24m                 Underline off
  1880.       CSI 25m                 Blink off
  1881.       CSI 27m                 Inverse off
  1882.       CSI 0"q                 Erase protectionoff
  1883.       CSI 1"q                 Non-erasable
  1884.       CSI 2"q                 Erasable
  1885.       CSI ?K                  Cursor to EOL
  1886.       CSI ?0K
  1887.       CSI ?1K                 SOL to Cursor
  1888.       CSI ?2K                 Whole line
  1889.       CSI ?J                  Cursor to EOP
  1890.       CSI ?0J
  1891.       CSI ?1J                 SOP to Cursor
  1892.       CSI ?2J                 Whole screen
  1893.  
  1894. 36                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  1895.  
  1896.  
  1897.  
  1898. A.2.4         Reports
  1899.  
  1900.  
  1901.       From host
  1902.       CSI i0c                 Secondary device attribute response
  1903.       From terminal
  1904.       CSI i1;17;0c            VT220, Software version 1.7
  1905.       From host
  1906.       CSI ?25n                Are the function-keys locked?
  1907.       From terminal
  1908.       CSI ?20n                Unlocked
  1909.       CSI ?21n                *NI Locked
  1910.  
  1911.  
  1912.  
  1913. A.2.5         Misc
  1914.  
  1915.  
  1916.       ESC [PnX               Erase Pn characters
  1917.       ESC [PnP               Delete Pn characters
  1918.       ESC [Pn@               Insert Pn blanks
  1919.       CSI !p                 Soft reset
  1920.       CSI ?38h               Tektronix mode
  1921.       CSI ?38l               VT200 mode
  1922.       CSI ?25h               *NI Cursor on
  1923.       CSI ?25l               *NI Cursor off
  1924.  
  1925. A.2.   VT2XX FUNCTIONS                                                     36
  1926.  
  1927.  
  1928.  
  1929. A.2.6          Downloadable  Function  Keys
  1930.  
  1931.  
  1932.        DCS Pc;Pl|Ky1/St1;.. ST
  1933.                                   Pc = 0 clear all keys (ignored)
  1934.                                   Pc = 1 don't clear keys (ignored)
  1935.                                   Pl = 0 lock keys (ignored)
  1936.                                   Pl = 1 don't lock keys (ignored)
  1937.                                   Ky1 Key number (decimal)
  1938.                                   St1 String (hex)
  1939.  
  1940.  
  1941.  
  1942. A.2.7          Downloadable  Character  Sets
  1943.  
  1944.  
  1945. Not implemented!  Sorry.
  1946.  
  1947.  
  1948.  
  1949. A.2.8          Control  Codes
  1950.  
  1951.  
  1952.        IND                      Index
  1953.        NEL                      Next line
  1954.        SSA                      Ignored
  1955.  
  1956. A.2.  VT3XX FUNCTIONS                                                       37
  1957.  
  1958.  
  1959.        ESA                      Ignored
  1960.        HTS                      Horizontal tab set
  1961.        HTJ                      Ignored
  1962.        VTS                      Ignored
  1963.        PLD                      Ignored
  1964.        PLU                      Ignored
  1965.        RI                       Reverse index
  1966.        SS2                      Single shift G2->GL
  1967.        SS3                      Single shift G3->GL
  1968.        DCS                      Device control string introducer
  1969.        PU1                      Ignored
  1970.        PU2                      Ignored
  1971.        STS                      Ignored
  1972.        CCH                      Ignored
  1973.        MW                       Ignored
  1974.        SPA                      Ignored
  1975.        EPA                      Ignored
  1976.        CSI                      Control sequence introducer
  1977.        ST                       String terminator
  1978.        OSC                      Ignored
  1979.        PM                       Ignored
  1980.        APC                      Ignored
  1981.  
  1982.  
  1983. A.3          VT3XX Functions
  1984.  
  1985. Cuurently only the implemented control sequences are listed.
  1986.  
  1987. A.3.1 Set Mode
  1988.  
  1989.        ESC ?67h           <Backspace> sends BS and <Delete> sends DEL
  1990.  
  1991. A.3.2 Reset Mode
  1992.      
  1993.        ESC ?67l           <Backspace> sends DEL and <Delete> sends BS
  1994.  
  1995. A.3.3 National Replacement Character Sets
  1996.  
  1997. In this mode the ASCII characters:
  1998.  
  1999.  # @ [ \ ] ^ _ ` { | } ~
  2000.  
  2001. are mapped into characters of the  international  character set.  Only one NRC
  2002. can be active at one time, the format to select one is:
  2003.  
  2004.         ESC primary final
  2005.  
  2006. 38                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  2007.  
  2008. Primary selector
  2009.  
  2010.         (               G0
  2011.         )               G1
  2012.         *               G2
  2013.         +               G3
  2014.  
  2015. Final selector
  2016.  
  2017.         A               British
  2018.         4               *RI Dutch
  2019.         5 or C          Finnish
  2020.         R               *RI French
  2021.         9 or Q          French Canadian
  2022.         K               German
  2023.         Y               Italian
  2024.         ' or E or 6     Norwegian/Dutch
  2025.         %6              *NI Portugese
  2026.         Z               Spanish
  2027.         7 or H          Swedish
  2028.         =               Swiss
  2029.  
  2030.  
  2031.  
  2032. A.4          4014  Mode
  2033.  
  2034.  
  2035. A.4.1         Alpha  Mode
  2036.  
  2037. Cursor Movement
  2038.  
  2039.       BS                        Cursor left
  2040.       HT                        Cursor right
  2041.       LF                        Cursor down
  2042.       VT                        Cursor up
  2043.       CR                        Cursor to left margin
  2044.  
  2045.  
  2046.  
  2047. Character Set Sizes
  2048.  
  2049.       ESC 8                    Normal 35x76 (lines x columns)
  2050.       ESC 9                    Small 38x81
  2051.       ESC :                    Smaller 50x120
  2052.       ESC ;                    Smallest 58x133
  2053.       ESC 6                    *NI Enter Italics ?
  2054.       ESC 7                    *NI Exit Italics ?
  2055.  
  2056. A.4.  4014 MODE                                                             39
  2057.  
  2058.  
  2059. Mode Changing
  2060.  
  2061.       GS                        Vector mode
  2062.       ESC  SUB                  GIN mode
  2063.       FS                        Point plot mode
  2064.       ESC  FS                   *NI Special point plot mode
  2065.       RS                        Incremental mode
  2066.       CAN                       Return to text terminal
  2067.  
  2068.  
  2069. A.4.2         Other  Functions  and  Extended  Escape  Codes
  2070.  
  2071.       ESC  ETB              Hardcopy
  2072.       ESC  ENQ              Transmit status
  2073.       ESC  STX              Enable block fill/erase
  2074.       ESC  ETX              Disable block fill/erase
  2075.       ESC "R                Enable rectangle draw
  2076.       ESC "r                Disable rectangle draw
  2077.       ESC x                 Enable selective erase
  2078.       ESC /0d               Dots on
  2079.       ESC /1d               Dots off
  2080.       ESC /2d               Dots complemented
  2081.  
  2082.  
  2083. A.4.3          Vector  Mode
  2084.  
  2085.        GS                      Next vector is dark
  2086.        address                 Draw vector, next vector is visible
  2087.        ESC `                   Solid vector
  2088.        ESC a                   Dotted
  2089.        ESC b                   Dot-dashed
  2090.        ESC c                   Short-dashed
  2091.        ESC d                   Long-dashed
  2092.        ESC p                   Solid vector, XOR
  2093.        ESC q                   Dotted, XOR
  2094.        ESC r                   Dot-dashed, XOR
  2095.        ESC s                   Short-dashed, XOR
  2096.        ESC t                   Long-dashed, XOR
  2097.        ESC  SUB                GIN mode
  2098.        US                      Alpha mode, don't move
  2099.        CR                      Alpha mode
  2100.        ESC  FF                 Alpha mode, clear screen
  2101.  
  2102. 40                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  2103.  
  2104.  
  2105. A.4.4          Point  Plot/Special  Point  Plot  Mode
  2106.  
  2107.        address                 Plot point
  2108.        intensity address       *NI Special plot point
  2109.        CR                      Alpha mode
  2110.        ESC  FF                 Alpha mode
  2111.  
  2112.  
  2113. A.4.5          Incremental  Point  Plot  Mode
  2114.  
  2115.        SP                      Pen up
  2116.        P                       Pen down
  2117.        D                       North
  2118.        E                       North east
  2119.        A                       East
  2120.        I                       South east
  2121.        H                       South
  2122.        J                       South west
  2123.        B                       West
  2124.        F                       North west
  2125.        CAN                     Alpha mode
  2126.        ESC SUB                 GIN mode
  2127.  
  2128.  
  2129. A.5          4105  Commands
  2130.  
  2131.  
  2132. In  the  following  list capital letters are part  of  the  command  sequences 
  2133. and lower case identifiers denote Tektronix encoded parameters.
  2134.  
  2135.       ESC IQ code             *NI Report terminal settings
  2136.       ESC IJ normal shifted   *NI Change GIN cursor speed
  2137.  
  2138.       ESC JC                  *NI Copy
  2139.  
  2140.       ESC KC                  *NI Cancel
  2141.       ESC KR mode             *NI Change carriage return/line feed mode
  2142.       ESC KD number contents  *NI Define macro
  2143.       ESC KO number contents  *NI Define nonvolatile macro
  2144.       ESC KA mode             *NI Enable dialog area
  2145.  
  2146. A.5.  4105 COMMANDS                                                         41
  2147.  
  2148.  
  2149.       ESC KW mode             *NI Enable key expansion
  2150.       ESC KX number           *NI Expand macro
  2151.       ESC KH mode             *NI Hardcopy
  2152.       ESC KI mode             Ignore deletes mode
  2153.       ESC KF mode             *NI Change line feed/carriage return mode
  2154.       ESC KL mode             *NI Lock keyboard
  2155.       ESC KQ                  *NI Report errors
  2156.       ESC KV                  *NI Reset
  2157.       ESC KU                  *NI Save nonvolatile parameters
  2158.       ESC KE mode             *NI Change echo mo de
  2159.       ESC KZ char-delete line-delete literal
  2160.                               *NI Change edit characters
  2161.       ESC KT threshold        *NI Change error threshold
  2162.  
  2163. A.5.   4105 COMMANDS                                                        40
  2164.  
  2165.       ESC KY char             *NI Change key execute character
  2166.       ESC KS mode             *NI Change transparent mode
  2167.       ESC KB positions        *NI Change tab stops
  2168.  
  2169.       ESC LL number           *NI Change number of lines in dialog area
  2170.       ESC LP start-point fill-boundary
  2171.                               *NI Start panel boundary
  2172.       ESC LZ                  *NI Clear dialog area
  2173.       ESC LG position         *NI Draw to position
  2174.       ESC LH position         *NI Draw marker at position
  2175.       ESC LE                  *NI Finish Panel 
  2176.       ESC LT text             *NI Graphic text
  2177.       ESC LF position         *NI Move to position
  2178.       ESC LB number           *NI Change number of lines for dialog buffer
  2179.       ESC LI char-color char-background-color dialog-background-color
  2180.                               *NI Change dialog area color
  2181.       ESC LV mode             *NI Change dialog area visibility
  2182.       ESC LM writing-mode     *NI Change dialog area writing mode
  2183.       ESC MP number           *NI Choose fill pattern
  2184.       ESC MG writing-mode     *NI Change graphics area writing mode
  2185.       ESC MN direction        *NI Change graphtext direction
  2186.       ESC MR mantissa power-of-two
  2187.                               *NI Change graphtext rotation
  2188.       ESC MC width height spacing
  2189.                               *NI Change graphtext size
  2190.       ESC ML color            *NI Change line color
  2191.       ESC MV style            Change line style
  2192.       ESC MM type            Change marker type
  2193.  
  2194. 42                             APPENDIX A.  CONTROL CODES AND ESCAPE SEQUENCES
  2195.  
  2196.  
  2197.       ESC MT text-color       *NI Change text color
  2198.  
  2199.  
  2200.       ESC NM mode             *NI Prompt mode
  2201.       ESC NR transmit receive
  2202.                               *NI Change baud rates
  2203.       ESC NK time             *NI Change break time
  2204.       ESC NU char             *NI Change echo suppression cancel character
  2205.       ESC NE string           *NI Change EOF string
  2206.       ESC NT string           *NI Change EOL string
  2207.       ESC NC first-char second-char
  2208.                               *NI Change EOM characters
  2209.       ESC NF mode             *NI Change flow control mode
  2210.       ESC NP string           *NIChange prompt string
  2211.       ESC NQ size             *NI Change input buffer size
  2212.       ESC NB stopbits         *NI Change number of stop bits
  2213.       ESC ND delay            *NI Change transmit delay
  2214.  
  2215.       ESC QI values           *NI Map color to monochrome values for print
  2216.       ESC QU density          *NI Choose color hardcopy image density
  2217.       ESC QD type             *NI Choose printer type
  2218.       ESC QL pages page-origin ff-mode
  2219.                               *NI Change dialog hardcopy attributes
  2220.       ESC QE attributes       *NI Change hardcopy monchrome attributes
  2221.       ESC QO orientation      *NI Change image orientation
  2222.  
  2223.       ESC RU plane writing-mode bits-per-pixel
  2224.                                   *NI Begin pixel operations
  2225.       ESC RX dest.-plane d.-lower-left-corner
  2226.       first-source-corner second-s.-corner
  2227.                                   *NI Copy pixels
  2228.       ESC RP number color
  2229.                                   *NI Write pixels
  2230.       ESC RR lower-left-corner upper-right-corner fill-color
  2231.                                   *NI Fill rectangle
  2232.       ESC RL array                *NI ?
  2233.       ESC RH position             *NI Move to pixel position
  2234.       ESC RS lower-left-corner upper-right-corner
  2235.                                   *NI Change coordinates for pixel operations
  2236.       ESC RW first-corner opposite-corner
  2237.                                   *NI Change window on 4096*4096 coordinates
  2238.  
  2239.       ESC TD first-color second-color
  2240.                                   *NI Change alpha cursor colors
  2241.  
  2242. A.5.  4105 COMMANDS                                                         43
  2243.  
  2244.  
  2245.       ESC TF colors               *NI Change color indices for dialog area
  2246.       ESC TG plane colors*NI Change color indices forplane
  2247.       ESC TC first-color second-color third-color
  2248.                                   *NI Change GIN cursor color
  2249.  
  2250.       ESC SX number position
  2251.                                   *NI Change GIN cursor position
  2252.  
  2253.       ESC  SUB                   Enter 4010 GIN mode
  2254.       ENQ                        *NI Inquire 4105 status
  2255.       US                         *NI Enter 4105 alpha mode
  2256.       ESC  CAN                   Enter echo suppression mode
  2257.       FS                         Enter marker mode
  2258.       GS                         Enter vector mode
  2259.       ESC  FF                    Clear screen, enter alpha mode
  2260.       ESC #!0                    Report terminal mode
  2261.       ESC  ENQ                   Report 4010 status
  2262.       ESC %!  mode               Change to a different terminal mode
  2263.       ESC  font                  Change fonts
  2264.       ESC  style                 Change 4014 line style
  2265.       ESC ETB                    4014 hardcopy
  2266.  
  2267.  
  2268.  
  2269.  
  2270. Appendix  B
  2271.  
  2272.  
  2273.  
  2274. ASCII   Control   Codes
  2275.  
  2276.  
  2277.  
  2278.  
  2279. B.1.  7-BIT CONTROL CODES                                                   45
  2280.  
  2281.  
  2282.  
  2283. B.1          7-bit  Control  Codes
  2284.  
  2285.  
  2286.  
  2287. ______________________________________________________________________________
  2288. |  Dec  | Oct  |   Hex  |   Keys   |    Atari     |   ASCII name             |
  2289. |_______|______|________|<Control>+|__character___|__________________________|
  2290. |  0    |000   |   00   |    <@>   |  None        |  N_ L Null               |
  2291. |  1    |001   |   01   |    <A>   |  Up Arrow    |  SOH  Start of header    |
  2292. |  2    |002   |   02   |    <B>   |  Down "      |  STX  Start text         |
  2293. |  3    |003   |   03   |    <C>   |  Right "     |  ETX  End text           |
  2294. |  4    |004   |   04   |    <D>   |  Left "      |  EOT  End of trans.      |
  2295. |  5    |005   |   05   |    <E>   |  Close Box   |  ENQ  Enquiry            |
  2296. |  6    |006   |   06   |    <F>   |  Move Box    |  ACK  Acknowledge        |
  2297. |  7    |007   |   07   |    <G>   |  Full Box    |  BEL  Bell               |
  2298. |  8    |010   |   08   |    <H>   |  Check       |  BS  Backspace           |
  2299. |  9    |011   |   09   |    <I>   |  Clock       |  TAB  Horizontal tab     |
  2300. |  10   |012   |   0A   |    <J>   |  Bell        |  LF  Linefeed            |
  2301. |  11   |013   |   0B   |    <K>   |  Note        |  VT  Vertical tab        |
  2302. |  12   |014   |   0C   |    <L>   |  FF          |  FF  Formfeed            |
  2303. |  13   |015   |   0D   |    <M>   |  CR          |  CR  Carrige return      |
  2304. |  14   |016   |   0E   |    <N>   |  Left Atari  |  SO  Shift out           |
  2305. |  15   |017   |   0F   |    <O>   |  Right "     |  SI  Shift in            |
  2306. |  16   |020   |   10   |    <P>   |  Led 0       |  DLE  Data link escape   |
  2307. |  17   |021   |   11   |    <Q>   |  Led 1       |  DC1  X-on               |
  2308. |  18   |022   |   12   |    <R>   |  Led 2       |  DC2                     |
  2309. |  19   |023   |   13   |    <S>   |  Led 3       |  DC3  X-off              |
  2310. |  20   |024   |   14   |    <T>   |  Led 4       |  DC4                     |
  2311. |  21   |025   |   15   |    <U>   |  Led 5       |  NAK  Neg. acknowledge   |
  2312. |  22   |026   |   16   |    <V>   |  Led 6       |  SYN  Synchronus idle    |
  2313. |  23   |027   |   17   |    <W>   |  Led 7       |  ETB  End trans. blocks  |
  2314. |  24   |030   |   18   |    <X>   |  Led 8       |  CAN  Cancel             |
  2315. |  25   |031   |   19   |    <Y>   |  Led 9       |  EM  End of medium       |
  2316. |  26   |032   |   1A   |    <Z>   |  ?           |  SUB  Substitute         |
  2317. |  27   |033   |   1B   |    <[>   |  ESC         |  ESC  Escape             |
  2318. |  28   |034   |   1C   |    <\>   |  Face p. 1   |  FS  File sep.           |
  2319. |  29   |035   |   1D   |    <]>   |  Face p. 2   |  GS  Group sep.          |
  2320. |  30   |036   |   1E   |    <^>   |  Face p. 3   |  RS  Record sep.         |
  2321. |  31   |037   |   1F   |    <_>   |  Face p. 4   |  US  Unit sep.           |
  2322. |  32   |040   |   20   | <Space>  |              |  SP  Space               |  
  2323. |_______|______|________|__________|______________|__________________________|
  2324.  
  2325. 46                                             APPENDIX B. ASCII CONTROL CODES
  2326.  
  2327.  
  2328. B.2          8-bit  Control  Codes
  2329. ______________________________________________________________________________
  2330. |  Dec  | Oct  |   Hex  |Keys <Meta>+  |   7-bit   |   ASCII name            |
  2331. |_______|______|________|__<Control>+__|___equiv.__|_________________________|
  2332. | 128   | 200  |   80   |      <@>     |   ESC @   | Unused                  |
  2333. | 129   | 201  |   81   |      <A>     |   ESC A   | Unused                  |
  2334. | 130   | 202  |   82   |      <B>     |   ESC B   | Unused                  |
  2335. | 131   | 203  |   83   |      <C>     |   ESC C   | Unused                  |
  2336. | 132   | 204  |   84   |      <D>     |   ESC D   | IND  Index              |
  2337. | 133   | 205  |   85   |      <E>     |   ESC E   | NEL  New line           |
  2338. | 134   | 206  |   86   |      <F>     |   ESC F   | SSA                     |
  2339. | 135   | 207  |   87   |      <G>     |   ESC G   | ESA                     |
  2340. | 136   | 210  |   88   |      <H>     |   ESC H   | HTS  Horizontal tab set |
  2341. | 137   | 211  |   89   |      <I>     |   ESC I   | HTJ                     |
  2342. | 138   | 212  |   8A   |      <J>     |   ESC J   | VTS                     |
  2343. | 139   | 213  |   8B   |      <K>     |   ESC K   | PLD                     |
  2344. | 140   | 214  |   8C   |      <L>     |   ESC L   | PLU                     |
  2345. | 141   | 215  |   8D   |      <M>     |   ESC M   | RI  Reverse index       |
  2346. | 142   | 216  |   8E   |      <N>     |   ESC N   | SS2  Single shift 2     |
  2347. | 143   | 217  |   8F   |      <O>     |   ESC O   | SS3  Single shift 3     |
  2348. | 144   | 220  |   90   |      <P>     |   ESC P   | DCS  Dev. ctrl string   |
  2349. | 145   | 221  |   91   |      <Q>     |   ESC Q   | PU1                     |
  2350. | 146   | 222  |   92   |      <R>     |   ESC R   | PU2                     |
  2351. | 147   | 223  |   93   |      <S>     |   ESC S   | STS                     |
  2352. | 148   | 224  |   94   |      <T>     |   ESC T   | CCH                     |
  2353. | 149   | 225  |   95   |      <U>     |   ESC U   | MW                      |
  2354. | 150   | 226  |   96   |      <V>     |   ESC V   | SPA                     |
  2355. | 151   | 227  |   97   |      <W>     |   ESC W   | EPA                     |
  2356. | 152   | 230  |   98   |      <X>     |   ESC X   | Unused                  |
  2357. | 153   | 231  |   99   |      <Y>     |   ESC Y   | Unused                  |
  2358. | 154   | 232  |   9A   |      <Z>     |   ESC Z   | Unused                  |
  2359. | 155   | 233  |   9B   |      <[>     |   ESC [   | CSI Command seq.  intro.|
  2360. | 156   | 234  |   9C   |      <\>     |   ESC \   | ST  String terminator   |
  2361. | 157   | 235  |   9D   |      <]>     |   ESC ]   | OSC                     |
  2362. | 158   | 236  |   9E   |      <^>     |   ESC ^   | PM                      |
  2363. | 159   | 237  |   9F   |      <_>     |   ESC _   | APC                     |
  2364. |_______|______|________|______________|___________|_________________________|
  2365.  
  2366. Due  to the way the german bios is written (and probably most of the  none  US 
  2367. versions) not all of these codes can be produced with the keyboard.
  2368.  
  2369.  
  2370. Appendix   C
  2371.  
  2372.  
  2373.  
  2374. Simple   Macro   Processor
  2375.  
  2376.  
  2377.  
  2378. The macro commands can be in the strings assigned to the function keys or in a 
  2379. file,  the command initiator is % for  function keys  (this is not needed in a  
  2380. macro file).
  2381.  
  2382. A command line is a maximum of 80 characters long.   The macro-processor works 
  2383. in two modi:
  2384.  
  2385. Function-key mode
  2386.         all characters between commands are sent to the serial port
  2387.  
  2388. Macro file mode
  2389.         everything  between  commands except  white-space  is a  syntax error, 
  2390.         additional commands are available in this mode.
  2391.  
  2392.  
  2393. C.1          Arguments
  2394.  
  2395. Arguments are enclosed in parentheses and separated by commas,  they can be of
  2396. the following types:
  2397.  
  2398. String constant
  2399.         character string enclosed in single quotes, max.  80 characters.
  2400.  
  2401. String variable
  2402.         10 user setable string variables are available: $1 to $10, additionaly
  2403.         5 predefined strings can be used. 
  2404.  
  2405. Integer constant
  2406.         positive integer in the range 0..32767.
  2407.  
  2408. Integer variable
  2409.         10  user setable  integer variables are  available:  @1 to @10,  range 
  2410.         -32768 to +32767.
  2411.  
  2412. 48                                          APPENDIX C. SIMPLE MACRO PROCESSOR
  2413.  
  2414. Function
  2415.         any of the built-in functions can be used as an argument.
  2416.  
  2417. C.2          Functions
  2418.  
  2419.  
  2420. All   commands   only   have  to  be  specified  to   the   point   they   are  
  2421. unique (for most commands this means one character).
  2422.  
  2423.         ADD(int1,in2)
  2424.         Arithmetic sum.
  2425.         Returns: int1 + int2
  2426.  
  2427.         AND(int1,int2)
  2428.         Logical and.
  2429.         Returns: int1 and int2
  2430.  
  2431.         ASSERT()
  2432.         Assert DTR.
  2433.         Returns: 0
  2434.  
  2435.         BREAK(len,drop-dtr)
  2436.         Send  Break  for  len  (integer)  mSec,   drop  DTR according  to  the 
  2437.         drop-dtr (integer) value.
  2438.         Returns: 0
  2439.  
  2440.         CONCAT(str1,str2)
  2441.         Concatenate   str1   (string)   and  str2   (string)   and   put   the  
  2442.         result  in the variable $TEMP.
  2443.         Returns: 0
  2444.  
  2445.         COPY(nr,str)
  2446.         Copy str (string) to string variable number nr (integer).
  2447.         Returns: 0
  2448.  
  2449.         COMPARE(str1,str2)
  2450.         Compare str1 (string) to str2 (string).
  2451.         Returns: 1 if str1 equals str2 else 0.
  2452.  
  2453.         DROP()
  2454.         Drop DTR.
  2455.         Returns: 0
  2456.  
  2457.         DIAL(num)
  2458.         Dial number num (1 to 10).
  2459.         Returns: 1 if sucessful, 0 otherwise.
  2460.  
  2461. C.2.  FUNCTIONS                                                             49
  2462.  
  2463.  
  2464.         ECHO(message)
  2465.         Echo message (string).
  2466.         Returns: 0
  2467.  
  2468.         FILESELECTOR(path,filename,prompt)
  2469.         Show  a  fileselector  with  path  path  (string),  filename  filename 
  2470.         (string) and a prompt of prompt (string).  The new values for path and 
  2471.         filename  are in the variables $PATH and $FILENAME.  
  2472.         Returns: 1 if [OK] is selected, else 0.
  2473.  
  2474.         GET(in-string,time)
  2475.         Wait for in-string (string),  with timeout time (integer)  sec.
  2476.         Returns: 1 if sucessful.
  2477.  
  2478.         HANGUP()
  2479.         Hangup the modem.
  2480.         Returns: 0
  2481.  
  2482.         HISTORY(switch)
  2483.         Turns history recording on if switch is 1 (does not reset the buffer).
  2484.         Returns: 0
  2485.  
  2486.         INLINE(mode)
  2487.         Reads a line from the keyboard (until <Return> is pressed or a maximum 
  2488.         of 80  characters  are read),  if mode is 1 (true) the  characters are 
  2489.         echoed.  The line read is copied into $TEMP.
  2490.         Returns: 0
  2491.  
  2492.         INPUT(prompt)
  2493.         Prompt for a line of input,  result is in $TEMP,  prompt is a  string. 
  2494.         Returns: 1 if [OK] is selected.
  2495.  
  2496.         KERMIT(mode,8-bit-mode,filespec)
  2497.         Start Kermit filetransfer with the following parameters:
  2498.         mode (string):             SEND : send file(s)
  2499.                                    REC : receive file(s)
  2500.                                    GET : receive file(s) from server
  2501.         8-bit-mode (integer):      0 : 7 bit ASCII text
  2502.                                    1 : 8 bit binary
  2503.         filespec (string):  file specification with wildcards.
  2504.         Returns: 0
  2505.  
  2506.         LOADSETUP(name)
  2507.         Load the setup file with name name (string).
  2508.         Returns: 0
  2509.  
  2510. 50                                         APPENDIX C.  SIMPLE MACRO PROCESSOR
  2511.  
  2512.  
  2513.         LOADTEL(filename)
  2514.         Load a dialer setup file.
  2515.         Returns: 0
  2516.  
  2517.         MESSAGE(msg)
  2518.         Displays  msg (string) on the  statusline.  If msg is empty the normal
  2519.         statusline is restored.
  2520.  
  2521.         MACRO(name)
  2522.         Execute the macro with filename name (string) from disk,  default path  
  2523.         is   the  current  directory.
  2524.         Returns: the value of the exit command, or
  2525.  
  2526.                 -3 : syntax error (line in $TEMP)
  2527.                 -2 : not enough stack (nested more than one level)
  2528.                 -1 : macro buffer full (more than 4kB)
  2529.  
  2530.         OR(int1,int2)
  2531.         Logical or.
  2532.         Returns: int1 or int2
  2533.  
  2534.         PATH(path)
  2535.         Change default path to path (string).
  2536.         Returns: 0
  2537.  
  2538.  
  2539.         POPUP(entry,command,name)
  2540.         Redefines an entry in the popup menu:
  2541.         entry :                         1..20
  2542.         command :                    see list
  2543.         name :  string that will be displayed
  2544.         Returns: 0
  2545.  
  2546.         RUN(name,commandline)
  2547.         Execute   program   name   (string)   with   commandline   commandline 
  2548.         (string). If its a .TTP program you'll be asked for parameters.
  2549.         Returns: Return code of program.
  2550.  
  2551.         REASSIGN(alt-key,command)
  2552.         Assigns integer value command to the alternate key value alt-key.
  2553.         Returns: 0
  2554.  
  2555.         SEND(out-string)
  2556.         Send out-string (string).
  2557.         Returns: 0
  2558.  
  2559. C.3.  PREFIX OPERATORS                                                      51
  2560.  
  2561.  
  2562.         SET(nr,int)
  2563.         Set integer variable number nr (integer) to int (integer).
  2564.         Returns: 0
  2565.  
  2566.         SUSPEND()
  2567.         Displays  "Press  any  key..."  on the  statusline  and  waits  for  a 
  2568.         keypress.
  2569.         Returns: 0
  2570.  
  2571.         WAIT(time)
  2572.         Wait for time (integer)mS x 100.
  2573.         Returns: 0
  2574.  
  2575.         UNICOMMAND(command)
  2576.         Execute one of UniTerm's internal commands, see list.
  2577.         Returns: 0
  2578.  
  2579.         XMODEM(mode,file)
  2580.         mode (string):      SEND : send file
  2581.                             REC : receive file
  2582.         file (string):      file to send/receive
  2583.         Returns: 0
  2584.  
  2585.         YMODEM(mode,filespec)
  2586.         mode (string):      SEND : send file(s)
  2587.                             REC : receive file(s)
  2588.         filespec (string):  file specification with wildcards
  2589.         Returns: 0
  2590.  
  2591.  
  2592. C.3          Prefix Operators
  2593.  
  2594.         -       negate integer value
  2595.         !       logical not
  2596.         "       return integer as string
  2597.         .       return string as integer
  2598.  
  2599. Bug: . and " don't know about negative integers.
  2600.  
  2601.  
  2602. 52                                         APPENDIX C.  SIMPLE MACRO PROCESSOR
  2603.  
  2604.  
  2605. C.4          String Constants
  2606.  
  2607. String  constants  are a  maximum of 80  characters long  and are  enclosed in 
  2608. single quotes.  Special ASCII values can be entered with the escape  character 
  2609. \, every character after \ equals itself, except:
  2610.  
  2611.         r       : is CR 
  2612.         n       : is LF 
  2613.         0xx     : \0xx is the octal ASCII value 0xx
  2614.  
  2615.  
  2616. C.5          Predefined String Variables
  2617.  
  2618.  
  2619. $PATH
  2620.         contains  the last  file  selector path,  is  initialized to  the home 
  2621.         directory of UniTerm.
  2622.  
  2623. $FILENAME
  2624.         contains the last file selector filename,  is initialized  to ''.
  2625.  
  2626. $CURRENT
  2627.         contains the current GEM DOS path.
  2628.  
  2629. $TEMP
  2630.         tempory string for use in the macro processor.
  2631.  
  2632. $VAR
  2633.         holds the  address of UniTerm's  parameter block for  passing to other
  2634.         programs.
  2635.  
  2636. C.6         Additional Features in Macro File Mode
  2637.  
  2638. C.6.1       Labels
  2639.  
  2640. Twenty local labels  (per macro file) can be used:  :1 to :20. A label must be 
  2641. the first and only  word on a line!
  2642.  
  2643. C.6.2       Comments
  2644.  
  2645. A line starting with # is ignored on input.
  2646.  
  2647.  
  2648.  
  2649. C.7 EXAMPLE                                                                 53
  2650.  
  2651.  
  2652. C.6.3        Additional Statements
  2653.  
  2654. These statements can only be used in macro file mode,  and will cause an error
  2655. if used from a function key.
  2656.  
  2657.         if(int)
  2658.         execute the rest of the line if int is not equal 0
  2659.  
  2660.         jump(nr)
  2661.         goto lanel number nr
  2662.  
  2663.         exit(int)
  2664.         stop processing and return with value int
  2665.  
  2666.         call(nr)
  2667.         execute subroutine at label nr (subroutines can't be nested)
  2668.  
  2669.         return()
  2670.         return from subroutine
  2671.  
  2672.  
  2673. C.7          Example
  2674.  
  2675. #####################################
  2676. # Test Macro for UniTerm V2.0b 017  #
  2677. # Copyright 1988 Simon Poole        #
  2678. #                                   #
  2679. #####################################
  2680. # turn history recording on
  2681. history(1)
  2682. call(20)
  2683. echo('\007\r\nSample UniTerm macro file')
  2684. echo('\r\n-------------------------\007') 
  2685. #
  2686. # Reset the modem
  2687. #
  2688. copy(1,'ATZ')
  2689. copy(2,'OK')
  2690. set(2,5)
  2691. call(4)
  2692. #
  2693. if(@1) echo('\r\nReset\r\n') jump(2)
  2694. #
  2695. echo('\r\nToo many retries\r\n') exit(-1)
  2696. #
  2697. # Dial the number and wait for CONNECT
  2698.  
  2699. 54                                         APPENDIX C.  SIMPLE MACRO PROCESSOR
  2700.  
  2701. # (in real life you would use the dial() function)
  2702. #
  2703. :2
  2704. # Get number from user
  2705. if(!input('Enter number (012512002)')) echo('\r\nCancelled') exit(0)
  2706. # if the string is empty use the default
  2707. if(compare($T,'')) concat('012512002','')
  2708. # Hayes want a ATD 
  2709. concat('ATD',$T)
  2710. # dial............
  2711. copy(1,$T)
  2712. copy(2,'CONNECT')
  2713. set(2,30)
  2714. call(4)
  2715. if(!@1) echo('\r\nFailed\r\n')exit(1)
  2716. #
  2717. # Login
  2718. #
  2719. # this is for our LocalNet 20 system
  2720. :6
  2721. send('\r')
  2722. if(!get('#',2)) break(100,FALSE) if(!get('#',2)) send('\001\001')
  2723. send('echo off\r')
  2724. if(!get('#',2)) echo('\r\nSomething is really wrong!') hangup() exit(-1)
  2725. # call the system
  2726. send('call e780\r')
  2727. # should have a counter here, but you can always stop with ^C
  2728. if(!get('COMPLETED',3)) send('done\r') jump(6)
  2729. if(!get('ogin',3)) send('done\r') jump(6)
  2730. send('poole\r')
  2731. #
  2732. # should send my password here
  2733. #
  2734. # Finished!
  2735. exit(0)
  2736. #########################################################
  2737. #                                                       #
  2738. #  Send a string to a Hayes compatible modem            #
  2739. #                                                       #
  2740. #########################################################
  2741. #
  2742. # @1 number of retries
  2743. # @2 timeout
  2744. # $1 string to send (telephone number...)
  2745.  
  2746. C.8.  UNITERM INTERNAL FUNCTION NUMBERS                                     55
  2747.  
  2748. # $2 string to wait for (CONNECT)
  2749. #
  2750. :4
  2751. set(1,3)
  2752. :5
  2753.    echo('\r\nTry: ')
  2754.    echo("add(4,-@1))
  2755.    set(1,add(@1,-1))
  2756.    wait(10)
  2757. # send attn string
  2758.    echo('\r\nSending +++')
  2759.    send('+++')
  2760. # we might get a OK here...
  2761.    get('OK',2)
  2762.    echo('\r\nSending ')
  2763.    echo($1) 
  2764.    send($1)
  2765.    send('\r')
  2766. if(and(!get($2,@2),@1)) jump(5)
  2767. return()
  2768. ########################################################
  2769. #                                                      #
  2770. # Home cursor and clear screen                         #
  2771. #                                                      #
  2772. ########################################################
  2773. :20
  2774. echo('\033[f\033[2J')
  2775. return()
  2776. ########################################################
  2777.  
  2778.  
  2779. A very useful aspect of the macro processor,  is that you can assign a  string 
  2780. like %R('TEMPUS.PRG','') to a function key and run your favourite editor  just 
  2781. by pressing one key.
  2782.  
  2783.  
  2784.  
  2785. C.5          UniTerm  Internal  Function Numbers
  2786.  
  2787.  
  2788.         ResetTek =              1
  2789.         VDIOutput =             2
  2790.         PrintTextScreen =       3
  2791.         TekMode =               4
  2792.         TextMode =              5
  2793.         Reset =                 6
  2794.         AutoPrint =             7
  2795.  
  2796. 56                                         APPENDIX C.  SIMPLE MACRO PROCESSOR
  2797.  
  2798.  
  2799.         Zoom =                  8
  2800.         132ColumnToggle =       9
  2801.         ScrollLock =           10
  2802.         49LineToggle =           11
  2803.         SendAnswerBack =         12
  2804.         ShortBreak =             13
  2805.         DropDTR =                14
  2806.         LongBreak =              15
  2807.         SaveHistory =            16
  2808.         ControlHistory =         17
  2809.         Switch =                 18
  2810.         ControlCapture =         19
  2811.         PlayBack =               20
  2812.         SendFile =               21
  2813.         DegasSave =              22
  2814.         ReplayHistory =          23
  2815.         Hangup =                 24
  2816.         Dial1 =                  25
  2817.         Dial2 =                  26
  2818.         Dial3 =                  27
  2819.         Dial4 =                  28
  2820.         Dial5 =                  29
  2821.         Dial6 =                  30
  2822.         Dial7 =                  31
  2823.         Dial8 =                  32
  2824.         Dial9 =                  33
  2825.         Dial10 =                 34
  2826.         SetPath =                35
  2827.         DelFile =                36
  2828.         DiskSpace =              37
  2829.         F1 =                     38
  2830.         F2 =                     39
  2831.         F3 =                     40
  2832.         F4 =                     41
  2833.         F5 =                     42
  2834.         F6 =                     43
  2835.         F7 =                     44
  2836.         F8 =                     45
  2837.         F9 =                     46
  2838.         F10 =                    47
  2839.         SF1 =                    48
  2840.         SF2 =                    49
  2841.         SF3 =                    50
  2842.  
  2843. C.8.  UNITERM INTERNAL FUNCTION NUMBERS                                     57
  2844.  
  2845.         SF4 =                    51 
  2846.         SF5 =                    52
  2847.         SF6 =                    53
  2848.         SF7 =                    54
  2849.         SF8 =                    55
  2850.         SF9 =                    56
  2851.         SF10 =                   57 
  2852.         Utilities =              58
  2853.         ToggleMeta =             59
  2854.         Help =                   60
  2855.         InsertClip =             61
  2856.         SaveClip =               62         
  2857.         ViewHistEOL =            63
  2858.  
  2859.  
  2860. Appendix  D
  2861.  
  2862.  
  2863.  
  2864. The   KeyEdit   Program
  2865.  
  2866.  
  2867.  
  2868. If  you  have got a complete release of UniTerm,  you should have  a  copy  of 
  2869. KEYEDIT.PRG  (Please  check  that it is for version  1.6f  or  higher!).  This 
  2870. program  enables  you to edit the keyboard table stored in  an  UniTerm  setup 
  2871. file,  additionally you can create an executable keyboard table loader or just 
  2872. output the table itself.
  2873.  
  2874.  
  2875.  
  2876. D.1          Editing  a  UniTerm  Setup  File
  2877.  
  2878.  
  2879. Start KEYEDIT.PRG and press  <Return>  when you see the opening dialog box. It 
  2880. will  take a few seconds to create the display.  You can only edit a  existing 
  2881. setup file with predictable results,  so select [Load UniTerm File] and select 
  2882. the file you want  to  edit.  Select  the  key  you  want  to  change  (select 
  2883. the  appropriate  part of the table (normal,  shifted or capslocked)) and then 
  2884. the  character  you want to assign to the key.   When you  are  finished  with 
  2885. editing, select [Save UniTerm File].
  2886.  
  2887. Don't try to change the characters on the keypad,  cursorkeys or function-keys 
  2888. in  the UniTerm setup file.  These keys are hardwired via keycode to  specific 
  2889. strings (like on a real VT100).
  2890.  
  2891.  
  2892.  
  2893. D.2          Updating your  Setup  File
  2894.  
  2895.  
  2896. To  move  your custom keyboard table from an old version of UniTerm to  a  new 
  2897. one, do the following:
  2898.  
  2899.      Rename the old setup file
  2900.  
  2901.      Start UniTerm and set all parameters that need changing
  2902.  
  2903.      Save the setup as UNITERM.SET
  2904.  
  2905. D.2.  UPDATING YOUR SETUP FILE                                              59
  2906.  
  2907.  
  2908.      Leave UniTerm and start KeyEdit
  2909.  
  2910.      Load your old setup file
  2911.  
  2912.      Save on top of UNITERM.SET
  2913.  
  2914.  
  2915.  
  2916. Appendix  E
  2917.  
  2918.  
  2919.  
  2920. Key   assignments   and   generated   codes
  2921.  
  2922.  
  2923.  
  2924.                          Table E.1: VT100 Cursor Keys
  2925.      ___________________________________________________________________
  2926.      |__VT100_Key____|_UniTerm_key__|__ANSI_normal_|__ANSI_application_|
  2927.      |  Cursor Up    | Cursor Up    |  ESC [A      |  ESC OA           |
  2928.      |  Cursor Down  | Cursor Down  |  ESC [B      |  ESC OB           |
  2929.      |  Cursor Right | Cursor Right |  ESC [C      |  ESC OC           |
  2930.      |__Cursor_Left__|_Cursor_Left__|__ESC_[D______|__ESC_OD___________|  
  2931.  
  2932.  
  2933.  
  2934.                          Table E.2: VT52 Cursor Keys
  2935.      ___________________________________________________________________
  2936.      |__VT100_Key____|_UniTerm_key__|__ANSI_normal_|__ANSI_application_|
  2937.      |  Cursor Up    | Cursor Up    |  ESC A       |  ESC A            |
  2938.      |  Cursor Down  | Cursor Down  |  ESC B       |  ESC B            |
  2939.      |  Cursor Right | Cursor Right |  ESC C       |  ESC C            |
  2940.      |__Cursor_Left__|_Cursor_Left__|__ESC_D_______|__ESC_D____________|  
  2941.  
  2942.  
  2943.  
  2944.                                                                             61
  2945.  
  2946.  
  2947.  
  2948.                            Table E.3: VT100 Keypad
  2949.   _________________________________________________________________________
  2950.   |__VT100_Key___|____UniTerm_key___|__Numeric_mode__|__Application_mode__|
  2951.   |  PF1         |    Keypad (      |  ESC OP        |  ESC OP            |
  2952.   |  PF2         |    Keypad )      |  ESC OQ        |  ESC OQ            |
  2953.   |  PF3         |    Keypad /      |  ESC OR        |  ESC OR            |
  2954.   |  PF4         |    Keypad *      |  ESC OS        |  ESC OS            |
  2955.   |  Keypad 7    |    Keypad 7      |  7             |  ESC Ow            |
  2956.   |  Keypad 8    |    Keypad 8      |  8             |  ESC Ox            |
  2957.   |  Keypad 9    |    Keypad 9      |  9             |  ESC Oy            |
  2958.   |  Keypad 4    |    Keypad 4      |  4             |  ESC Ot            |
  2959.   |  Keypad 5    |    Keypad 5      |  5             |  ESC Ou            |
  2960.   |  Keypad 6    |    Keypad 6      |  6             |  ESC Ov            |
  2961.   |  Keypad 1    |    Keypad 1      |  1             |  ESC Oq            |
  2962.   |  Keypad 2    |    Keypad 2      |  2             |  ESC Or            |
  2963.   |  Keypad 3    |    Keypad 3      |  3             |  ESC Os            |
  2964.   |  Keypad 0    |    Keypad 0      |  0             |  ESC Op            |
  2965.   |  Keypad -    |    Keypad -      |  -             |  ESC Om            |
  2966.   |  Keypad ,    |    Keypad +      |  ,             |  ESC Ol            |
  2967.   |  Keypad .    |    Keypad .      |  .             |  ESC On            |
  2968.   |__Keypad_Enter|____Keypad_Enter__|__CR/CRLF_______|__ESC_OM____________|
  2969.  
  2970.  
  2971. 62                            APPENDIX E.  KEY ASSIGNMENTS AND GENERATED CODES
  2972.  
  2973.                      Table E.4: VT100 Keypad (VT52 mode)
  2974.   _________________________________________________________________________
  2975.   |__VT100_Key___|____UniTerm_key___|__Numeric_mode__|__Application_mode__|
  2976.   |  PF1         |    Keypad (      |  ESC P         |  ESC P             |
  2977.   |  PF2         |    Keypad )      |  ESC Q         |  ESC Q             |
  2978.   |  PF3         |    Keypad /      |  ESC R         |  ESC R             |
  2979.   |  PF4         |    Keypad *      |  ESC S         |  ESC S             |
  2980.   |  Keypad 7    |    Keypad 7      |  7             |  ESC ?w            |
  2981.   |  Keypad 8    |    Keypad 8      |  8             |  ESC ?x            |
  2982.   |  Keypad 9    |    Keypad 9      |  9             |  ESC ?y            |
  2983.   |  Keypad 4    |    Keypad 4      |  4             |  ESC ?t            |
  2984.   |  Keypad 5    |    Keypad 5      |  5             |  ESC ?u            |
  2985.   |  Keypad 6    |    Keypad 6      |  6             |  ESC ?v            |
  2986.   |  Keypad 1    |    Keypad 1      |  1             |  ESC ?q            |
  2987.   |  Keypad 2    |    Keypad 2      |  2             |  ESC ?r            |
  2988.   |  Keypad 3    |    Keypad 3      |  3             |  ESC ?s            |
  2989.   |  Keypad 0    |    Keypad 0      |  0             |  ESC ?p            |
  2990.   |  Keypad -    |    Keypad -      |  -             |  ESC ?m            |
  2991.   |  Keypad ,    |    Keypad +      |  ,             |  ESC ?l            |
  2992.   |  Keypad .    |    Keypad .      |  .             |  ESC ?n            |
  2993.   |__Keypad_Enter|____Keypad_Enter__|__CR/CRLF_______|__ESC_?M____________|
  2994.  
  2995.  
  2996.  
  2997.                                                                             63
  2998.  
  2999.  
  3000.  
  3001.                             Table E.5: VT2XX Keys
  3002.                _______________________________________________
  3003.                |  VT2XX Key  |Assigned to   |    Sends       |
  3004.                |             |  for down-   |  (default      |
  3005.                |_____________|loadable_keys_|___on_a_VT2XX)__|
  3006.                |  Find       |              |    ESC [1~     |
  3007.                |  Insert here|              |    ESC [2~     |
  3008.                |  Remove     |              |    ESC [3~     |
  3009.                |  Select     |              |    ESC [4~     |
  3010.                |  Prev Screen|              |    ESC [5~     |
  3011.                |__Next_Screen|______________|____ESC_[6~_____|
  3012.                |  F6 (F6)    |          F1  |    ESC [17~    |
  3013.                |  F7 (F7)    |          F2  |    ESC [18~    |
  3014.                |  F8 (F8)    |          F3  |    ESC [19~    |
  3015.                |  F9 (F9)    |          F4  |    ESC [20~    |
  3016.                |  F10 (F10)  |          F5  |    ESC [21~    |
  3017.                |  F11 (F11)  |          F6  |    ESC [23~    |
  3018.                |  F12 (F12)  |          F7  |    ESC [24~    |
  3019.                |  F13 (F13)  |          F8  |    ESC [25~    |
  3020.                |  F14 (F14)  |          F9  |    ESC [26~    |
  3021.                |  Help (F15) |          F10 |    ESC [28~    |
  3022.                |  Do (F16)   |    Shift F1  |    ESC [29~    |
  3023.                |  F17 (F17)  |    Shift F2  |    ESC [31~    |
  3024.                |  F18 (F18)  |    Shift F3  |    ESC [32~    |
  3025.                |  F19 (F19)  |    Shift F4  |    ESC [33~    |
  3026.                |  F20 (F20)  |    Shift F5  |    ESC [34~    |
  3027.                |_____________|______________|________________|
  3028.  
  3029.  
  3030.  
  3031.